Test Setup Failed
Push — master ( 8ee19e...25278d )
by recca
05:07 queued 46s
created

terminal.js ➔ ... ➔ no   B

Complexity

Conditions 6
Paths 386

Size

Total Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 6
nc 386
nop 2
dl 0
loc 1
rs 7
c 1
b 0
f 0
1
!function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="./",t(t.s=133)}([function(e,t,n){var r,i;r=[n(16),n(1),n(129),n(34),n(70),n(72),n(31),n(28),n(130),n(30),n(71),n(128),n(10),n(47)],i=function(e,t,n,r,i,o,a,s,l,c,u,f,p,d){"use strict";function h(e){var t=!!e&&"length"in e&&e.length,n=g.type(e);return"function"!==n&&!g.isWindow(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}var m="3.1.1",g=function(e,t){return new g.fn.init(e,t)},v=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,y=/^-ms-/,x=/-([a-z])/g,b=function(e,t){return t.toUpperCase()};return g.fn=g.prototype={jquery:m,constructor:g,length:0,toArray:function(){return r.call(this)},get:function(e){return null==e?r.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=g.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return g.each(this,e)},map:function(e){return this.pushStack(g.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(r.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:o,sort:e.sort,splice:e.splice},g.extend=g.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,l=arguments.length,c=!1;for("boolean"==typeof a&&(c=a,a=arguments[s]||{},s++),"object"==typeof a||g.isFunction(a)||(a={}),s===l&&(a=this,s--);s<l;s++)if(null!=(e=arguments[s]))for(t in e)n=a[t],r=e[t],a!==r&&(c&&r&&(g.isPlainObject(r)||(i=g.isArray(r)))?(i?(i=!1,o=n&&g.isArray(n)?n:[]):o=n&&g.isPlainObject(n)?n:{},a[t]=g.extend(c,o,r)):void 0!==r&&(a[t]=r));return a},g.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isFunction:function(e){return"function"===g.type(e)},isArray:Array.isArray,isWindow:function(e){return null!=e&&e===e.window},isNumeric:function(e){var t=g.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},isPlainObject:function(e){var t,r;return!(!e||"[object Object]"!==l.call(e))&&(!(t=n(e))||(r=c.call(t,"constructor")&&t.constructor,"function"==typeof r&&u.call(r)===f))},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?s[l.call(e)]||"object":typeof e},globalEval:function(e){d(e)},camelCase:function(e){return e.replace(y,"ms-").replace(x,b)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t){var n,r=0;if(h(e))for(n=e.length;r<n&&t.call(e[r],r,e[r])!==!1;r++);else for(r in e)if(t.call(e[r],r,e[r])===!1)break;return e},trim:function(e){return null==e?"":(e+"").replace(v,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(h(Object(e))?g.merge(n,"string"==typeof e?[e]:e):o.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:a.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r,i=[],o=0,a=e.length,s=!n;o<a;o++)r=!t(e[o],o),r!==s&&i.push(e[o]);return i},map:function(e,t,n){var r,o,a=0,s=[];if(h(e))for(r=e.length;a<r;a++)o=t(e[a],a,n),null!=o&&s.push(o);else for(a in e)o=t(e[a],a,n),null!=o&&s.push(o);return i.apply([],s)},guid:1,proxy:function(e,t){var n,i,o;if("string"==typeof t&&(n=e[t],t=e,e=n),g.isFunction(e))return i=r.call(arguments,2),o=function(){return e.apply(t||this,i.concat(r.call(arguments)))},o.guid=e.guid=e.guid||g.guid++,o},now:Date.now,support:p}),"function"==typeof Symbol&&(g.fn[Symbol.iterator]=e[Symbol.iterator]),g.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){s["[object "+t+"]"]=t.toLowerCase()}),g}.apply(t,r),!(void 0!==i&&(e.exports=i))},function(e,t,n){var r;r=function(){"use strict";return window.document}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r,i;r=[n(125)],i=function(){"use strict"}.apply(t,r),!(void 0!==i&&(e.exports=i))},function(e,t,n){!function(t,n){e.exports=n()}(this,function(){"use strict";function e(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}function t(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function n(e,n){return t(e).appendChild(n)}function r(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o<t.length;++o)i.appendChild(t[o]);return i}function i(e,t){if(3==t.nodeType&&(t=t.parentNode),e.contains)return e.contains(t);do if(11==t.nodeType&&(t=t.host),t==e)return!0;while(t=t.parentNode)}function o(){var e;try{e=document.activeElement}catch(t){e=document.body||null}for(;e&&e.root&&e.root.activeElement;)e=e.root.activeElement;return e}function a(t,n){var r=t.className;e(n).test(r)||(t.className+=(r?" ":"")+n)}function s(t,n){for(var r=t.split(" "),i=0;i<r.length;i++)r[i]&&!e(r[i]).test(n)&&(n+=" "+r[i]);return n}function l(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function c(e,t,n){t||(t={});for(var r in e)!e.hasOwnProperty(r)||n===!1&&t.hasOwnProperty(r)||(t[r]=e[r]);return t}function u(e,t,n,r,i){null==t&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var o=r||0,a=i||0;;){var s=e.indexOf("\t",o);if(s<0||s>=t)return a+(t-o);a+=s-o,a+=n-a%n,o=s+1}}function f(){this.id=null}function p(e,t){for(var n=0;n<e.length;++n)if(e[n]==t)return n;return-1}function d(e,t,n){for(var r=0,i=0;;){var o=e.indexOf("\t",r);o==-1&&(o=e.length);var a=o-r;if(o==e.length||i+a>=t)return r+Math.min(a,t-i);if(i+=o-r,i+=n-i%n,r=o+1,i>=t)return r}}function h(e){for(;La.length<=e;)La.push(m(La)+" ");return La[e]}function m(e){return e[e.length-1]}function g(e,t){for(var n=[],r=0;r<e.length;r++)n[r]=t(e[r],r);return n}function v(e,t,n){for(var r=0,i=n(t);r<e.length&&n(e[r])<=i;)r++;e.splice(r,0,t)}function y(){}function x(e,t){var n;return Object.create?n=Object.create(e):(y.prototype=e,n=new y),t&&c(t,n),n}function b(e){return/\w/.test(e)||e>"€"&&(e.toUpperCase()!=e.toLowerCase()||Fa.test(e))}function w(e,t){return t?!!(t.source.indexOf("\\w")>-1&&b(e))||t.test(e):b(e)}function k(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}function _(e){return e.charCodeAt(0)>=768&&Oa.test(e)}function C(e,t,n){var i=this;this.input=n,i.scrollbarFiller=r("div",null,"CodeMirror-scrollbar-filler"),i.scrollbarFiller.setAttribute("cm-not-content","true"),i.gutterFiller=r("div",null,"CodeMirror-gutter-filler"),i.gutterFiller.setAttribute("cm-not-content","true"),i.lineDiv=r("div",null,"CodeMirror-code"),i.selectionDiv=r("div",null,null,"position: relative; z-index: 1"),i.cursorDiv=r("div",null,"CodeMirror-cursors"),i.measure=r("div",null,"CodeMirror-measure"),i.lineMeasure=r("div",null,"CodeMirror-measure"),i.lineSpace=r("div",[i.measure,i.lineMeasure,i.selectionDiv,i.cursorDiv,i.lineDiv],null,"position: relative; outline: none"),i.mover=r("div",[r("div",[i.lineSpace],"CodeMirror-lines")],null,"position: relative"),i.sizer=r("div",[i.mover],"CodeMirror-sizer"),i.sizerWidth=null,i.heightForcer=r("div",null,null,"position: absolute; height: "+Ca+"px; width: 1px;"),i.gutters=r("div",null,"CodeMirror-gutters"),i.lineGutter=null,i.scroller=r("div",[i.sizer,i.heightForcer,i.gutters],"CodeMirror-scroll"),i.scroller.setAttribute("tabIndex","-1"),i.wrapper=r("div",[i.scrollbarFiller,i.gutterFiller,i.scroller],"CodeMirror"),na&&ra<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),ia||Zo&&pa||(i.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(i.wrapper):e(i.wrapper)),i.viewFrom=i.viewTo=t.first,i.reportedViewFrom=i.reportedViewTo=t.first,i.view=[],i.renderedView=null,i.externalMeasured=null,i.viewOffset=0,i.lastWrapHeight=i.lastWrapWidth=0,i.updateLineNumbers=null,i.nativeBarWidth=i.barHeight=i.barWidth=0,i.scrollbarsClipped=!1,i.lineNumWidth=i.lineNumInnerWidth=i.lineNumChars=null,i.alignWidgets=!1,i.cachedCharWidth=i.cachedTextHeight=i.cachedPaddingH=null,i.maxLine=null,i.maxLineLength=0,i.maxLineChanged=!1,i.wheelDX=i.wheelDY=i.wheelStartX=i.wheelStartY=null,i.shift=!1,i.selForContextMenu=null,i.activeTouch=null,n.init(i)}function S(e,t){if(t-=e.first,t<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(t<o){n=i;break}t-=o}return n.lines[t]}function T(e,t,n){var r=[],i=t.line;return e.iter(t.line,n.line+1,function(e){var o=e.text;i==n.line&&(o=o.slice(0,n.ch)),i==t.line&&(o=o.slice(t.ch)),r.push(o),++i}),r}function A(e,t,n){var r=[];return e.iter(t,n,function(e){r.push(e.text)}),r}function M(e,t){var n=t-e.height;if(n)for(var r=e;r;r=r.parent)r.height+=n}function L(e){if(null==e.parent)return null;for(var t=e.parent,n=p(t.lines,e),r=t.parent;r;t=r,r=r.parent)for(var i=0;r.children[i]!=t;++i)n+=r.children[i].chunkSize();return n+t.first}function F(e,t){var n=e.first;e:do{for(var r=0;r<e.children.length;++r){var i=e.children[r],o=i.height;if(t<o){e=i;continue e}t-=o,n+=i.chunkSize()}return n}while(!e.lines);for(var a=0;a<e.lines.length;++a){var s=e.lines[a],l=s.height;if(t<l)break;t-=l}return n+a}function O(e,t){return t>=e.first&&t<e.first+e.size}function E(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function D(e,t){return this instanceof D?(this.line=e,void(this.ch=t)):new D(e,t)}function N(e,t){return e.line-t.line||e.ch-t.ch}function j(e){return D(e.line,e.ch)}function P(e,t){return N(e,t)<0?t:e}function I(e,t){return N(e,t)<0?e:t}function R(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function q(e,t){if(t.line<e.first)return D(e.first,0);var n=e.first+e.size-1;return t.line>n?D(n,S(e,n).text.length):B(t,S(e,t.line).text.length)}function B(e,t){var n=e.ch;return null==n||n>t?D(e.line,t):n<0?D(e.line,0):e}function z(e,t){for(var n=[],r=0;r<t.length;r++)n[r]=q(e,t[r]);return n}function H(){Ea=!0}function W(){Da=!0}function $(e,t,n){this.marker=e,this.from=t,this.to=n}function K(e,t){if(e)for(var n=0;n<e.length;++n){var r=e[n];if(r.marker==t)return r}}function U(e,t){for(var n,r=0;r<e.length;++r)e[r]!=t&&(n||(n=[])).push(e[r]);return n}function V(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}function G(e,t,n){var r;if(e)for(var i=0;i<e.length;++i){var o=e[i],a=o.marker,s=null==o.from||(a.inclusiveLeft?o.from<=t:o.from<t);if(s||o.from==t&&"bookmark"==a.type&&(!n||!o.marker.insertLeft)){var l=null==o.to||(a.inclusiveRight?o.to>=t:o.to>t);(r||(r=[])).push(new $(a,o.from,l?null:o.to))}}return r}function X(e,t,n){var r;if(e)for(var i=0;i<e.length;++i){var o=e[i],a=o.marker,s=null==o.to||(a.inclusiveRight?o.to>=t:o.to>t);if(s||o.from==t&&"bookmark"==a.type&&(!n||o.marker.insertLeft)){var l=null==o.from||(a.inclusiveLeft?o.from<=t:o.from<t);(r||(r=[])).push(new $(a,l?null:o.from-t,null==o.to?null:o.to-t))}}return r}function Y(e,t){if(t.full)return null;var n=O(e,t.from.line)&&S(e,t.from.line).markedSpans,r=O(e,t.to.line)&&S(e,t.to.line).markedSpans;if(!n&&!r)return null;var i=t.from.ch,o=t.to.ch,a=0==N(t.from,t.to),s=G(n,i,a),l=X(r,o,a),c=1==t.text.length,u=m(t.text).length+(c?i:0);if(s)for(var f=0;f<s.length;++f){var p=s[f];if(null==p.to){var d=K(l,p.marker);d?c&&(p.to=null==d.to?null:d.to+u):p.to=i}}if(l)for(var h=0;h<l.length;++h){var g=l[h];if(null!=g.to&&(g.to+=u),null==g.from){var v=K(s,g.marker);v||(g.from=u,c&&(s||(s=[])).push(g))}else g.from+=u,c&&(s||(s=[])).push(g)}s&&(s=J(s)),l&&l!=s&&(l=J(l));var y=[s];if(!c){var x,b=t.text.length-2;if(b>0&&s)for(var w=0;w<s.length;++w)null==s[w].to&&(x||(x=[])).push(new $(s[w].marker,null,null));for(var k=0;k<b;++k)y.push(x);y.push(l)}return y}function J(e){for(var t=0;t<e.length;++t){var n=e[t];null!=n.from&&n.from==n.to&&n.marker.clearWhenEmpty!==!1&&e.splice(t--,1)}return e.length?e:null}function Q(e,t,n){var r=null;if(e.iter(t.line,n.line+1,function(e){if(e.markedSpans)for(var t=0;t<e.markedSpans.length;++t){var n=e.markedSpans[t].marker;!n.readOnly||r&&p(r,n)!=-1||(r||(r=[])).push(n)}}),!r)return null;for(var i=[{from:t,to:n}],o=0;o<r.length;++o)for(var a=r[o],s=a.find(0),l=0;l<i.length;++l){var c=i[l];if(!(N(c.to,s.from)<0||N(c.from,s.to)>0)){var u=[l,1],f=N(c.from,s.from),d=N(c.to,s.to);(f<0||!a.inclusiveLeft&&!f)&&u.push({from:c.from,to:s.from}),(d>0||!a.inclusiveRight&&!d)&&u.push({from:s.to,to:c.to}),i.splice.apply(i,u),l+=u.length-1}}return i}function Z(e){var t=e.markedSpans;if(t){for(var n=0;n<t.length;++n)t[n].marker.detachLine(e);e.markedSpans=null}}function ee(e,t){if(t){for(var n=0;n<t.length;++n)t[n].marker.attachLine(e);e.markedSpans=t}}function te(e){return e.inclusiveLeft?-1:0}function ne(e){return e.inclusiveRight?1:0}function re(e,t){var n=e.lines.length-t.lines.length;if(0!=n)return n;var r=e.find(),i=t.find(),o=N(r.from,i.from)||te(e)-te(t);if(o)return-o;var a=N(r.to,i.to)||ne(e)-ne(t);return a?a:t.id-e.id}function ie(e,t){var n,r=Da&&e.markedSpans;if(r)for(var i=void 0,o=0;o<r.length;++o)i=r[o],i.marker.collapsed&&null==(t?i.from:i.to)&&(!n||re(n,i.marker)<0)&&(n=i.marker);return n}function oe(e){return ie(e,!0)}function ae(e){return ie(e,!1)}function se(e,t,n,r,i){var o=S(e,t),a=Da&&o.markedSpans;if(a)for(var s=0;s<a.length;++s){var l=a[s];if(l.marker.collapsed){var c=l.marker.find(0),u=N(c.from,n)||te(l.marker)-te(i),f=N(c.to,r)||ne(l.marker)-ne(i);if(!(u>=0&&f<=0||u<=0&&f>=0)&&(u<=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?N(c.to,n)>=0:N(c.to,n)>0)||u>=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?N(c.from,r)<=0:N(c.from,r)<0)))return!0}}}function le(e){for(var t;t=oe(e);)e=t.find(-1,!0).line;return e}function ce(e){for(var t,n;t=ae(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function ue(e,t){var n=S(e,t),r=le(n);return n==r?t:L(r)}function fe(e,t){if(t>e.lastLine())return t;var n,r=S(e,t);if(!pe(e,r))return t;for(;n=ae(r);)r=n.find(1,!0).line;return L(r)+1}function pe(e,t){var n=Da&&t.markedSpans;if(n)for(var r=void 0,i=0;i<n.length;++i)if(r=n[i],r.marker.collapsed){if(null==r.from)return!0;if(!r.marker.widgetNode&&0==r.from&&r.marker.inclusiveLeft&&de(e,t,r))return!0}}function de(e,t,n){if(null==n.to){var r=n.marker.find(1,!0);return de(e,r.line,K(r.line.markedSpans,n.marker))}if(n.marker.inclusiveRight&&n.to==t.text.length)return!0;for(var i=void 0,o=0;o<t.markedSpans.length;++o)if(i=t.markedSpans[o],i.marker.collapsed&&!i.marker.widgetNode&&i.from==n.to&&(null==i.to||i.to!=n.from)&&(i.marker.inclusiveLeft||n.marker.inclusiveRight)&&de(e,t,i))return!0}function he(e){e=le(e);for(var t=0,n=e.parent,r=0;r<n.lines.length;++r){var i=n.lines[r];if(i==e)break;t+=i.height}for(var o=n.parent;o;n=o,o=n.parent)for(var a=0;a<o.children.length;++a){var s=o.children[a];if(s==n)break;t+=s.height}return t}function me(e){if(0==e.height)return 0;for(var t,n=e.text.length,r=e;t=oe(r);){var i=t.find(0,!0);r=i.from.line,n+=i.from.ch-i.to.ch}for(r=e;t=ae(r);){var o=t.find(0,!0);n-=r.text.length-o.from.ch,r=o.to.line,n+=r.text.length-o.to.ch}return n}function ge(e){var t=e.display,n=e.doc;t.maxLine=S(n,n.first),t.maxLineLength=me(t.maxLine),t.maxLineChanged=!0,n.iter(function(e){var n=me(e);n>t.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)})}function ve(e,t,n,r){if(!e)return r(t,n,"ltr");for(var i=!1,o=0;o<e.length;++o){var a=e[o];(a.from<n&&a.to>t||t==n&&a.to==t)&&(r(Math.max(a.from,t),Math.min(a.to,n),1==a.level?"rtl":"ltr"),i=!0)}i||r(t,n,"ltr")}function ye(e){return e.level%2?e.to:e.from}function xe(e){return e.level%2?e.from:e.to}function be(e){var t=Ae(e);return t?ye(t[0]):0}function we(e){var t=Ae(e);return t?xe(m(t)):e.text.length}function ke(e,t,n){var r=e[0].level;return t==r||n!=r&&t<n}function _e(e,t){var n;Na=null;for(var r=0;r<e.length;++r){var i=e[r];if(i.from<t&&i.to>t)return r;if(i.from==t||i.to==t){if(null!=n)return ke(e,i.level,e[n].level)?(i.from!=i.to&&(Na=n),r):(i.from!=i.to&&(Na=r),n);n=r}}return n}function Ce(e,t,n,r){if(!r)return t+n;do t+=n;while(t>0&&_(e.text.charAt(t)));return t}function Se(e,t,n,r){var i=Ae(e);if(!i)return Te(e,t,n,r);for(var o=_e(i,t),a=i[o],s=Ce(e,t,a.level%2?-n:n,r);;){if(s>a.from&&s<a.to)return s;if(s==a.from||s==a.to)return _e(i,s)==o?s:(a=i[o+=n],n>0==a.level%2?a.to:a.from);if(a=i[o+=n],!a)return null;s=n>0==a.level%2?Ce(e,a.to,-1,r):Ce(e,a.from,1,r)}}function Te(e,t,n,r){var i=t+n;if(r)for(;i>0&&_(e.text.charAt(i));)i+=n;return i<0||i>e.text.length?null:i}function Ae(e){var t=e.order;return null==t&&(t=e.order=ja(e.text)),t}function Me(e,t){return e._handlers&&e._handlers[t]||Pa}function Le(e,t,n){if(e.removeEventListener)e.removeEventListener(t,n,!1);else if(e.detachEvent)e.detachEvent("on"+t,n);else{var r=e._handlers,i=r&&r[t];if(i){var o=p(i,n);o>-1&&(r[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function Fe(e,t){var n=Me(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i<n.length;++i)n[i].apply(null,r)}function Oe(e,t,n){return"string"==typeof t&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),Fe(e,n||t.type,e,t),Ie(t)||t.codemirrorIgnore}function Ee(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var n=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),r=0;r<t.length;++r)p(n,t[r])==-1&&n.push(t[r])}function De(e,t){return Me(e,t).length>0}function Ne(e){e.prototype.on=function(e,t){Ia(this,e,t)},e.prototype.off=function(e,t){Le(this,e,t)}}function je(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Pe(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Ie(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function Re(e){je(e),Pe(e)}function qe(e){return e.target||e.srcElement}function Be(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),da&&e.ctrlKey&&1==t&&(t=3),t}function ze(e){if(null==ka){var t=r("span","​");n(e,r("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(ka=t.offsetWidth<=1&&t.offsetHeight>2&&!(na&&ra<8))}var i=ka?r("span","​"):r("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return i.setAttribute("cm-text",""),i}function He(e){if(null!=_a)return _a;var r=n(e,document.createTextNode("AخA")),i=va(r,0,1).getBoundingClientRect(),o=va(r,1,2).getBoundingClientRect();return t(e),!(!i||i.left==i.right)&&(_a=o.right-i.right<3)}function We(e){if(null!=Ha)return Ha;var t=n(e,r("span","x")),i=t.getBoundingClientRect(),o=va(t,0,1).getBoundingClientRect();return Ha=Math.abs(i.left-o.left)>1}function $e(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Wa[e]=t}function Ke(e,t){$a[e]=t}function Ue(e){if("string"==typeof e&&$a.hasOwnProperty(e))e=$a[e];else if(e&&"string"==typeof e.name&&$a.hasOwnProperty(e.name)){var t=$a[e.name];"string"==typeof t&&(t={name:t}),e=x(t,e),e.name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Ue("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Ue("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Ve(e,t){t=Ue(t);var n=Wa[t.name];if(!n)return Ve(e,"text/plain");var r=n(e,t);if(Ka.hasOwnProperty(t.name)){var i=Ka[t.name];for(var o in i)i.hasOwnProperty(o)&&(r.hasOwnProperty(o)&&(r["_"+o]=r[o]),r[o]=i[o])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var a in t.modeProps)r[a]=t.modeProps[a];return r}function Ge(e,t){var n=Ka.hasOwnProperty(e)?Ka[e]:Ka[e]={};c(t,n)}function Xe(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function Ye(e,t){for(var n;e.innerMode&&(n=e.innerMode(t),n&&n.mode!=e);)t=n.state,e=n.mode;return n||{mode:e,state:t}}function Je(e,t,n){return!e.startState||e.startState(t,n)}function Qe(e,t,n,r){var i=[e.state.modeGen],o={};at(e,t.text,e.doc.mode,n,function(e,t){return i.push(e,t)},o,r);for(var a=function(n){var r=e.state.overlays[n],a=1,s=0;at(e,t.text,r.mode,!0,function(e,t){for(var n=a;s<e;){var o=i[a];o>e&&i.splice(a,1,e,i[a+1],o),a+=2,s=Math.min(e,o)}if(t)if(r.opaque)i.splice(n,a-n,e,"overlay "+t),a=n+2;else for(;n<a;n+=2){var l=i[n+1];i[n+1]=(l?l+" ":"")+"overlay "+t}},o)},s=0;s<e.state.overlays.length;++s)a(s);return{styles:i,classes:o.bgClass||o.textClass?o:null}}function Ze(e,t,n){if(!t.styles||t.styles[0]!=e.state.modeGen){var r=et(e,L(t)),i=Qe(e,t,t.text.length>e.options.maxHighlightLength?Xe(e.doc.mode,r):r);t.stateAfter=r,t.styles=i.styles,i.classes?t.styleClasses=i.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.frontier&&e.doc.frontier++}return t.styles}function et(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return!0;var o=st(e,t,n),a=o>r.first&&S(r,o-1).stateAfter;return a=a?Xe(r.mode,a):Je(r.mode),r.iter(o,t,function(n){tt(e,n.text,a);var s=o==t-1||o%5==0||o>=i.viewFrom&&o<i.viewTo;n.stateAfter=s?Xe(r.mode,a):null,++o}),n&&(r.frontier=o),a}function tt(e,t,n,r){var i=e.doc.mode,o=new Ua(t,e.options.tabSize);for(o.start=o.pos=r||0,""==t&&nt(i,n);!o.eol();)rt(i,o,n),o.start=o.pos}function nt(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var n=Ye(e,t);return n.mode.blankLine?n.mode.blankLine(n.state):void 0}}function rt(e,t,n,r){for(var i=0;i<10;i++){r&&(r[0]=Ye(e,n).mode);var o=e.token(t,n);if(t.pos>t.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}function it(e,t,n,r){var i,o=function(e){return{start:f.start,end:f.pos,string:f.current(),type:i||null,state:e?Xe(a.mode,u):u}},a=e.doc,s=a.mode;t=q(a,t);var l,c=S(a,t.line),u=et(e,t.line,n),f=new Ua(c.text,e.options.tabSize);for(r&&(l=[]);(r||f.pos<t.ch)&&!f.eol();)f.start=f.pos,i=rt(s,f,u),r&&l.push(o(!0));return r?l:o()}function ot(e,t){if(e)for(;;){var n=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!n)break;e=e.slice(0,n.index)+e.slice(n.index+n[0].length);var r=n[1]?"bgClass":"textClass";null==t[r]?t[r]=n[2]:new RegExp("(?:^|s)"+n[2]+"(?:$|s)").test(t[r])||(t[r]+=" "+n[2])}return e}function at(e,t,n,r,i,o,a){var s=n.flattenSpans;null==s&&(s=e.options.flattenSpans);var l,c=0,u=null,f=new Ua(t,e.options.tabSize),p=e.options.addModeClass&&[null];for(""==t&&ot(nt(n,r),o);!f.eol();){if(f.pos>e.options.maxHighlightLength?(s=!1,a&&tt(e,t,r,f.pos),f.pos=t.length,l=null):l=ot(rt(n,f,r,p),o),p){var d=p[0].name;d&&(l="m-"+(l?d+" "+l:d))}if(!s||u!=l){for(;c<f.start;)c=Math.min(f.start,c+5e3),i(c,u);u=l}f.start=f.pos}for(;c<f.pos;){var h=Math.min(f.pos,c+5e3);i(h,u),c=h}}function st(e,t,n){for(var r,i,o=e.doc,a=n?-1:t-(e.doc.mode.innerMode?1e3:100),s=t;s>a;--s){if(s<=o.first)return o.first;var l=S(o,s-1);if(l.stateAfter&&(!n||s<=o.frontier))return s;var c=u(l.text,null,e.options.tabSize);(null==i||r>c)&&(i=s-1,r=c)}return i}function lt(e,t,n){this.text=e,ee(this,t),this.height=n?n(this):1}function ct(e,t,n,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),Z(e),ee(e,n);var i=r?r(e):1;i!=e.height&&M(e,i)}function ut(e){e.parent=null,Z(e)}function ft(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?Xa:Ga;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function pt(e,t){var n=r("span",null,null,ia?"padding-right: .1px":null),i={pre:r("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:(na||ia)&&e.getOption("lineWrapping")};n.setAttribute("role","presentation"),i.pre.setAttribute("role","presentation"),t.measure={};for(var o=0;o<=(t.rest?t.rest.length:0);o++){var a=o?t.rest[o-1]:t.line,l=void 0;i.pos=0,i.addToken=ht,He(e.display.measure)&&(l=Ae(a))&&(i.addToken=gt(i.addToken,l)),i.map=[];var c=t!=e.display.externalMeasured&&L(a);yt(a,i,Ze(e,a,c)),a.styleClasses&&(a.styleClasses.bgClass&&(i.bgClass=s(a.styleClasses.bgClass,i.bgClass||"")),a.styleClasses.textClass&&(i.textClass=s(a.styleClasses.textClass,i.textClass||""))),0==i.map.length&&i.map.push(0,0,i.content.appendChild(ze(e.display.measure))),0==o?(t.measure.map=i.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(i.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(ia){var u=i.content.lastChild;(/\bcm-tab\b/.test(u.className)||u.querySelector&&u.querySelector(".cm-tab"))&&(i.content.className="cm-tab-wrap-hack")}return Fe(e,"renderLine",e,t.line,i.pre),i.pre.className&&(i.textClass=s(i.pre.className,i.textClass||"")),i}function dt(e){var t=r("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function ht(e,t,n,i,o,a,s){if(t){var l,c=e.splitSpaces?mt(t,e.trailingSpace):t,u=e.cm.state.specialChars,f=!1;if(u.test(t)){l=document.createDocumentFragment();for(var p=0;;){u.lastIndex=p;var d=u.exec(t),m=d?d.index-p:t.length-p;if(m){var g=document.createTextNode(c.slice(p,p+m));na&&ra<9?l.appendChild(r("span",[g])):l.appendChild(g),e.map.push(e.pos,e.pos+m,g),e.col+=m,e.pos+=m}if(!d)break;p+=m+1;var v=void 0;if("\t"==d[0]){var y=e.cm.options.tabSize,x=y-e.col%y;v=l.appendChild(r("span",h(x),"cm-tab")),v.setAttribute("role","presentation"),v.setAttribute("cm-text","\t"),e.col+=x}else"\r"==d[0]||"\n"==d[0]?(v=l.appendChild(r("span","\r"==d[0]?"␍":"␤","cm-invalidchar")),v.setAttribute("cm-text",d[0]),e.col+=1):(v=e.cm.options.specialCharPlaceholder(d[0]),v.setAttribute("cm-text",d[0]),na&&ra<9?l.appendChild(r("span",[v])):l.appendChild(v),e.col+=1);e.map.push(e.pos,e.pos+1,v),e.pos++}}else e.col+=t.length,l=document.createTextNode(c),e.map.push(e.pos,e.pos+t.length,l),na&&ra<9&&(f=!0),e.pos+=t.length;if(e.trailingSpace=32==c.charCodeAt(t.length-1),n||i||o||f||s){var b=n||"";i&&(b+=i),o&&(b+=o);var w=r("span",[l],b,s);return a&&(w.title=a),e.content.appendChild(w)}e.content.appendChild(l)}}function mt(e,t){if(e.length>1&&!/  /.test(e))return e;for(var n=t,r="",i=0;i<e.length;i++){var o=e.charAt(i);" "!=o||!n||i!=e.length-1&&32!=e.charCodeAt(i+1)||(o=" "),r+=o,n=" "==o}return r}function gt(e,t){return function(n,r,i,o,a,s,l){i=i?i+" cm-force-border":"cm-force-border";for(var c=n.pos,u=c+r.length;;){for(var f=void 0,p=0;p<t.length&&(f=t[p],!(f.to>c&&f.from<=c));p++);if(f.to>=u)return e(n,r,i,o,a,s,l);e(n,r.slice(0,f.to-c),i,o,null,s,l),o=null,r=r.slice(f.to-c),c=f.to}}}function vt(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function yt(e,t,n){var r=e.markedSpans,i=e.text,o=0;if(r)for(var a,s,l,c,u,f,p,d=i.length,h=0,m=1,g="",v=0;;){if(v==h){l=c=u=f=s="",p=null,v=1/0;for(var y=[],x=void 0,b=0;b<r.length;++b){var w=r[b],k=w.marker;"bookmark"==k.type&&w.from==h&&k.widgetNode?y.push(k):w.from<=h&&(null==w.to||w.to>h||k.collapsed&&w.to==h&&w.from==h)?(null!=w.to&&w.to!=h&&v>w.to&&(v=w.to,c=""),k.className&&(l+=" "+k.className),k.css&&(s=(s?s+";":"")+k.css),k.startStyle&&w.from==h&&(u+=" "+k.startStyle),k.endStyle&&w.to==v&&(x||(x=[])).push(k.endStyle,w.to),k.title&&!f&&(f=k.title),k.collapsed&&(!p||re(p.marker,k)<0)&&(p=w)):w.from>h&&v>w.from&&(v=w.from)}if(x)for(var _=0;_<x.length;_+=2)x[_+1]==v&&(c+=" "+x[_]);if(!p||p.from==h)for(var C=0;C<y.length;++C)vt(t,0,y[C]);if(p&&(p.from||0)==h){if(vt(t,(null==p.to?d+1:p.to)-h,p.marker,null==p.from),null==p.to)return;p.to==h&&(p=!1)}}if(h>=d)break;for(var S=Math.min(d,v);;){if(g){var T=h+g.length;if(!p){var A=T>S?g.slice(0,S-h):g;t.addToken(t,A,a?a+l:l,u,h+A.length==v?c:"",f,s)}if(T>=S){g=g.slice(S-h),h=S;break}h=T,u=""}g=i.slice(o,o=n[m++]),a=ft(n[m++],t.cm.options)}}else for(var M=1;M<n.length;M+=2)t.addToken(t,i.slice(o,o=n[M]),ft(n[M+1],t.cm.options))}function xt(e,t,n){this.line=t,this.rest=ce(t),this.size=this.rest?L(m(this.rest))-n+1:1,this.node=this.text=null,this.hidden=pe(e,t)}function bt(e,t,n){for(var r,i=[],o=t;o<n;o=r){var a=new xt(e.doc,S(e.doc,o),o);r=o+a.size,i.push(a)}return i}function wt(e){Ya?Ya.ops.push(e):e.ownsGroup=Ya={ops:[e],delayedCallbacks:[]}}function kt(e){var t=e.delayedCallbacks,n=0;do{for(;n<t.length;n++)t[n].call(null);for(var r=0;r<e.ops.length;r++){var i=e.ops[r];if(i.cursorActivityHandlers)for(;i.cursorActivityCalled<i.cursorActivityHandlers.length;)i.cursorActivityHandlers[i.cursorActivityCalled++].call(null,i.cm)}}while(n<t.length)}function _t(e,t){var n=e.ownsGroup;if(n)try{kt(n)}finally{Ya=null,t(n)}}function Ct(e,t){var n=Me(e,t);if(n.length){var r,i=Array.prototype.slice.call(arguments,2);Ya?r=Ya.delayedCallbacks:Ja?r=Ja:(r=Ja=[],setTimeout(St,0));for(var o=function(e){r.push(function(){return n[e].apply(null,i)})},a=0;a<n.length;++a)o(a)}}function St(){var e=Ja;Ja=null;for(var t=0;t<e.length;++t)e[t]()}function Tt(e,t,n,r){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];"text"==o?Ft(e,t):"gutter"==o?Et(e,t,n,r):"class"==o?Ot(t):"widget"==o&&Dt(e,t,r)}t.changes=null}function At(e){return e.node==e.text&&(e.node=r("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),na&&ra<8&&(e.node.style.zIndex=2)),e.node}function Mt(e){var t=e.bgClass?e.bgClass+" "+(e.line.bgClass||""):e.line.bgClass;if(t&&(t+=" CodeMirror-linebackground"),e.background)t?e.background.className=t:(e.background.parentNode.removeChild(e.background),e.background=null);else if(t){var n=At(e);e.background=n.insertBefore(r("div",null,t),n.firstChild)}}function Lt(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):pt(e,t)}function Ft(e,t){var n=t.text.className,r=Lt(e,t);t.text==t.node&&(t.node=r.pre),t.text.parentNode.replaceChild(r.pre,t.text),t.text=r.pre,r.bgClass!=t.bgClass||r.textClass!=t.textClass?(t.bgClass=r.bgClass,t.textClass=r.textClass,Ot(t)):n&&(t.text.className=n)}function Ot(e){Mt(e),e.line.wrapClass?At(e).className=e.line.wrapClass:e.node!=e.text&&(e.node.className="");var t=e.textClass?e.textClass+" "+(e.line.textClass||""):e.line.textClass;e.text.className=t||""}function Et(e,t,n,i){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var o=At(t);t.gutterBackground=r("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?i.fixedPos:-i.gutterTotalWidth)+"px; width: "+i.gutterTotalWidth+"px"),o.insertBefore(t.gutterBackground,t.text)}var a=t.line.gutterMarkers;if(e.options.lineNumbers||a){var s=At(t),l=t.gutter=r("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?i.fixedPos:-i.gutterTotalWidth)+"px");if(e.display.input.setUneditable(l),s.insertBefore(l,t.text),t.line.gutterClass&&(l.className+=" "+t.line.gutterClass),!e.options.lineNumbers||a&&a["CodeMirror-linenumbers"]||(t.lineNumber=l.appendChild(r("div",E(e.options,n),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+i.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),a)for(var c=0;c<e.options.gutters.length;++c){var u=e.options.gutters[c],f=a.hasOwnProperty(u)&&a[u];f&&l.appendChild(r("div",[f],"CodeMirror-gutter-elt","left: "+i.gutterLeft[u]+"px; width: "+i.gutterWidth[u]+"px"))}}}function Dt(e,t,n){t.alignable&&(t.alignable=null);for(var r=t.node.firstChild,i=void 0;r;r=i)i=r.nextSibling,"CodeMirror-linewidget"==r.className&&t.node.removeChild(r);jt(e,t,n)}function Nt(e,t,n,r){var i=Lt(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),Ot(t),Et(e,t,n,r),jt(e,t,r),t.node}function jt(e,t,n){if(Pt(e,t.line,t,n,!0),
0 ignored issues
show
Bug introduced by
The variable Symbol seems to be never declared. If this is a global, consider adding a /** global: Symbol */ comment.

This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.

To learn more about declaring variables in Javascript, see the MDN.

Loading history...
Bug introduced by
The variable s is changed as part of the for loop for example by Math.min(e, o) on line 1. Only the value of the last iteration will be visible in this function if it is called after the loop.
Loading history...
Unused Code introduced by
The assignment to variable r seems to be never used. Consider removing it.
Loading history...
Bug introduced by
The variable a is changed as part of the for loop for example by 2 on line 1. Only the value of the last iteration will be visible in this function if it is called after the loop.
Loading history...
Bug introduced by
The variable i seems to not be initialized for all possible execution paths.
Loading history...
introduced by
The for loop does not have a body. Maybe you have misplaced a semicolon. If you do wish to have a loop without a body, use an empty body {}.
Loading history...
Bug introduced by
The variable s seems to not be initialized for all possible execution paths. Are you sure addToken handles undefined variables?
Loading history...
Unused Code introduced by
The assignment to variable v seems to be never used. Consider removing it.
Loading history...
Coding Style Best Practice introduced by
By convention, constructors like y should be capitalized.
Loading history...
Bug introduced by
The variable n seems to not be initialized for all possible execution paths.
Loading history...
Best Practice introduced by
There is no return statement in this branch, but you do return something in other branches. Did you maybe miss it? If you do not want to return anything, consider adding return undefined; explicitly.
Loading history...
Bug introduced by
The variable r is changed as part of the for loop for example by [] on line 1. Only the value of the last iteration will be visible in this function if it is called after the loop.
Loading history...
Bug introduced by
The variable l seems to not be initialized for all possible execution paths.
Loading history...
Complexity Best Practice introduced by
There is no return statement if e is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Unused Code introduced by
The variable t seems to be never used. Consider removing it.
Loading history...
Bug introduced by
The variable f seems to not be initialized for all possible execution paths. Are you sure addToken handles undefined variables?
Loading history...
Complexity Best Practice introduced by
There is no return statement if a is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Complexity Best Practice introduced by
There is no return statement if e.innerMode is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Complexity Best Practice introduced by
There is no return statement if n is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Bug introduced by
The variable r seems to not be initialized for all possible execution paths.
Loading history...
Coding Style Best Practice introduced by
Curly braces around statements make for more readable code and help prevent bugs when you add further statements.

Consider adding curly braces around all statements when they are executed conditionally. This is optional if there is only one statement, but leaving them out can lead to unexpected behaviour if another statement is added later.

Consider:

if (a > 0)
    b = 42;

If you or someone else later decides to put another statement in, only the first statement will be executed.

if (a > 0)
    console.log("a > 0");
    b = 42;

In this case the statement b = 42 will always be executed, while the logging statement will be executed conditionally.

if (a > 0) {
    console.log("a > 0");
    b = 42;
}

ensures that the proper code will be executed conditionally no matter how many statements are added or removed.

Loading history...
Unused Code introduced by
The parameter n is not used and could be removed.

This check looks for parameters in functions that are not used in the function body and are not followed by other parameters which are used inside the function.

Loading history...
Unused Code introduced by
The parameter t is not used and could be removed.

This check looks for parameters in functions that are not used in the function body and are not followed by other parameters which are used inside the function.

Loading history...
Bug introduced by
The variable x seems to not be initialized for all possible execution paths. Are you sure push handles undefined variables?
Loading history...
Unused Code introduced by
The assignment to variable o seems to be never used. Consider removing it.
Loading history...
introduced by
You have used a bitwise operator & in a condition. Did you maybe want to use the logical operator &&
Loading history...
Comprehensibility introduced by
Usage of the sequence operator is discouraged, since it may lead to obfuscated code.

The sequence or comma operator allows the inclusion of multiple expressions where only is permitted. The result of the sequence is the value of the last expression.

This operator is most often used in for statements.

Used in another places it can make code hard to read, especially when people do not realize it even exists as a seperate operator.

This check looks for usage of the sequence operator in locations where it is not necessary and could be replaced by a series of expressions or statements.

var a,b,c;

a = 1, b = 1,  c= 3;

could just as well be written as:

var a,b,c;

a = 1;
b = 1;
c = 3;

To learn more about the sequence operator, please refer to the MDN.

Loading history...
Bug introduced by
The variable u seems to not be initialized for all possible execution paths. Are you sure addToken handles undefined variables?
Loading history...
Coding Style Best Practice introduced by
By convention, constructors like xt should be capitalized.
Loading history...
Complexity Best Practice introduced by
There is no return statement if "string" == typeof t &&... e = n, g.isFunction(e) is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Coding Style introduced by
Consider using undefined instead of void(0). It is equivalent and more straightforward to read.
Loading history...
Comprehensibility Best Practice introduced by
The name e is already used for a variable on line 1. Please consider using another name to prevent misunderstandings.
Loading history...
Unused Code introduced by
The assignment to variable i seems to be never used. Consider removing it.
Loading history...
Complexity Best Practice introduced by
There is no return statement if t is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Bug introduced by
The variable c seems to not be initialized for all possible execution paths.
Loading history...
Complexity introduced by
A for in loop automatically includes the property of any prototype object, consider checking the key using hasOwnProperty.

When iterating over the keys of an object, this includes not only the keys of the object, but also keys contained in the prototype of that object. It is generally a best practice to check for these keys specifically:

var someObject;
for (var key in someObject) {
    if ( ! someObject.hasOwnProperty(key)) {
        continue; // Skip keys from the prototype.
    }

    doSomethingWith(key);
}
Loading history...
Unused Code introduced by
The assignment to variable l seems to be never used. Consider removing it.
Loading history...
2
t.rest)for(var r=0;r<t.rest.length;r++)Pt(e,t.rest[r],t,n,!1)}function Pt(e,t,n,i,o){if(t.widgets)for(var a=At(n),s=0,l=t.widgets;s<l.length;++s){var c=l[s],u=r("div",[c.node],"CodeMirror-linewidget");c.handleMouseEvents||u.setAttribute("cm-ignore-events","true"),It(c,u,n,i),e.display.input.setUneditable(u),o&&c.above?a.insertBefore(u,n.gutter||n.text):a.appendChild(u),Ct(c,"redraw")}}function It(e,t,n,r){if(e.noHScroll){(n.alignable||(n.alignable=[])).push(t);var i=r.wrapperWidth;t.style.left=r.fixedPos+"px",e.coverGutter||(i-=r.gutterTotalWidth,t.style.paddingLeft=r.gutterTotalWidth+"px"),t.style.width=i+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-r.gutterTotalWidth+"px"))}function Rt(e){if(null!=e.height)return e.height;var t=e.doc.cm;if(!t)return 0;if(!i(document.body,e.node)){var o="position: relative;";e.coverGutter&&(o+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(o+="width: "+t.display.wrapper.clientWidth+"px;"),n(t.display.measure,r("div",[e.node],null,o))}return e.height=e.node.parentNode.offsetHeight}function qt(e,t){for(var n=qe(t);n!=e.wrapper;n=n.parentNode)if(!n||1==n.nodeType&&"true"==n.getAttribute("cm-ignore-events")||n.parentNode==e.sizer&&n!=e.mover)return!0}function Bt(e){return e.lineSpace.offsetTop}function zt(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Ht(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=n(e.measure,r("pre","x")),i=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,o={left:parseInt(i.paddingLeft),right:parseInt(i.paddingRight)};return isNaN(o.left)||isNaN(o.right)||(e.cachedPaddingH=o),o}function Wt(e){return Ca-e.display.nativeBarWidth}function $t(e){return e.display.scroller.clientWidth-Wt(e)-e.display.barWidth}function Kt(e){return e.display.scroller.clientHeight-Wt(e)-e.display.barHeight}function Ut(e,t,n){var r=e.options.lineWrapping,i=r&&$t(e);if(!t.measure.heights||r&&t.measure.width!=i){var o=t.measure.heights=[];if(r){t.measure.width=i;for(var a=t.text.firstChild.getClientRects(),s=0;s<a.length-1;s++){var l=a[s],c=a[s+1];Math.abs(l.bottom-c.bottom)>2&&o.push((l.bottom+c.top)/2-n.top)}}o.push(n.bottom-n.top)}}function Vt(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var r=0;r<e.rest.length;r++)if(e.rest[r]==t)return{map:e.measure.maps[r],cache:e.measure.caches[r]};for(var i=0;i<e.rest.length;i++)if(L(e.rest[i])>n)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function Gt(e,t){t=le(t);var r=L(t),i=e.display.externalMeasured=new xt(e.doc,t,r);i.lineN=r;var o=i.built=pt(e,i);return i.text=o.pre,n(e.display.lineMeasure,o.pre),i}function Xt(e,t,n,r){return Qt(e,Jt(e,t),n,r)}function Yt(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[Cn(e,t)];var n=e.display.externalMeasured;return n&&t>=n.lineN&&t<n.lineN+n.size?n:void 0}function Jt(e,t){var n=L(t),r=Yt(e,n);r&&!r.text?r=null:r&&r.changes&&(Tt(e,r,n,xn(e)),e.curOp.forceUpdate=!0),r||(r=Gt(e,t));var i=Vt(r,t,n);return{line:t,view:r,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function Qt(e,t,n,r,i){t.before&&(n=-1);var o,a=n+(r||"");return t.cache.hasOwnProperty(a)?o=t.cache[a]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(Ut(e,t.view,t.rect),t.hasHeights=!0),o=tn(e,t,n,r),o.bogus||(t.cache[a]=o)),{left:o.left,right:o.right,top:i?o.rtop:o.top,bottom:i?o.rbottom:o.bottom}}function Zt(e,t,n){for(var r,i,o,a,s,l,c=0;c<e.length;c+=3)if(s=e[c],l=e[c+1],t<s?(i=0,o=1,a="left"):t<l?(i=t-s,o=i+1):(c==e.length-3||t==l&&e[c+3]>t)&&(o=l-s,i=o-1,t>=l&&(a="right")),null!=i){if(r=e[c+2],s==l&&n==(r.insertLeft?"left":"right")&&(a=n),"left"==n&&0==i)for(;c&&e[c-2]==e[c-3]&&e[c-1].insertLeft;)r=e[(c-=3)+2],a="left";if("right"==n&&i==l-s)for(;c<e.length-3&&e[c+3]==e[c+4]&&!e[c+5].insertLeft;)r=e[(c+=3)+2],a="right";break}return{node:r,start:i,end:o,collapse:a,coverStart:s,coverEnd:l}}function en(e,t){var n=Qa;if("left"==t)for(var r=0;r<e.length&&(n=e[r]).left==n.right;r++);else for(var i=e.length-1;i>=0&&(n=e[i]).left==n.right;i--);return n}function tn(e,t,n,r){var i,o=Zt(t.map,n,r),a=o.node,s=o.start,l=o.end,c=o.collapse;if(3==a.nodeType){for(var u=0;u<4;u++){for(;s&&_(t.line.text.charAt(o.coverStart+s));)--s;for(;o.coverStart+l<o.coverEnd&&_(t.line.text.charAt(o.coverStart+l));)++l;if(i=na&&ra<9&&0==s&&l==o.coverEnd-o.coverStart?a.parentNode.getBoundingClientRect():en(va(a,s,l).getClientRects(),r),i.left||i.right||0==s)break;l=s,s-=1,c="right"}na&&ra<11&&(i=nn(e.display.measure,i))}else{s>0&&(c=r="right");var f;i=e.options.lineWrapping&&(f=a.getClientRects()).length>1?f["right"==r?f.length-1:0]:a.getBoundingClientRect()}if(na&&ra<9&&!s&&(!i||!i.left&&!i.right)){var p=a.parentNode.getClientRects()[0];i=p?{left:p.left,right:p.left+yn(e.display),top:p.top,bottom:p.bottom}:Qa}for(var d=i.top-t.rect.top,h=i.bottom-t.rect.top,m=(d+h)/2,g=t.view.measure.heights,v=0;v<g.length-1&&!(m<g[v]);v++);var y=v?g[v-1]:0,x=g[v],b={left:("right"==c?i.right:i.left)-t.rect.left,right:("left"==c?i.left:i.right)-t.rect.left,top:y,bottom:x};return i.left||i.right||(b.bogus=!0),e.options.singleCursorHeightPerLine||(b.rtop=d,b.rbottom=h),b}function nn(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!We(e))return t;var n=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*n,right:t.right*n,top:t.top*r,bottom:t.bottom*r}}function rn(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function on(e){e.display.externalMeasure=null,t(e.display.lineMeasure);for(var n=0;n<e.display.view.length;n++)rn(e.display.view[n])}function an(e){on(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function sn(){return window.pageXOffset||(document.documentElement||document.body).scrollLeft}function ln(){return window.pageYOffset||(document.documentElement||document.body).scrollTop}function cn(e,t,n,r,i){if(!i&&t.widgets)for(var o=0;o<t.widgets.length;++o)if(t.widgets[o].above){var a=Rt(t.widgets[o]);n.top+=a,n.bottom+=a}if("line"==r)return n;r||(r="local");var s=he(t);if("local"==r?s+=Bt(e.display):s-=e.display.viewOffset,"page"==r||"window"==r){var l=e.display.lineSpace.getBoundingClientRect();s+=l.top+("window"==r?0:ln());var c=l.left+("window"==r?0:sn());n.left+=c,n.right+=c}return n.top+=s,n.bottom+=s,n}function un(e,t,n){if("div"==n)return t;var r=t.left,i=t.top;if("page"==n)r-=sn(),i-=ln();else if("local"==n||!n){var o=e.display.sizer.getBoundingClientRect();r+=o.left,i+=o.top}var a=e.display.lineSpace.getBoundingClientRect();return{left:r-a.left,top:i-a.top}}function fn(e,t,n,r,i){return r||(r=S(e.doc,t.line)),cn(e,r,Xt(e,r,t.ch,i),n)}function pn(e,t,n,r,i,o){function a(t,a){var s=Qt(e,i,t,a?"right":"left",o);return a?s.left=s.right:s.right=s.left,cn(e,r,s,n)}function s(e,t){var n=l[t],r=n.level%2;return e==ye(n)&&t&&n.level<l[t-1].level?(n=l[--t],e=xe(n)-(n.level%2?0:1),r=!0):e==xe(n)&&t<l.length-1&&n.level<l[t+1].level&&(n=l[++t],e=ye(n)-n.level%2,r=!1),r&&e==n.to&&e>n.from?a(e-1):a(e,r)}r=r||S(e.doc,t.line),i||(i=Jt(e,r));var l=Ae(r),c=t.ch;if(!l)return a(c);var u=_e(l,c),f=s(c,u);return null!=Na&&(f.other=s(c,Na)),f}function dn(e,t){var n=0;t=q(e.doc,t),e.options.lineWrapping||(n=yn(e.display)*t.ch);var r=S(e.doc,t.line),i=he(r)+Bt(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function hn(e,t,n,r){var i=D(e,t);return i.xRel=r,n&&(i.outside=!0),i}function mn(e,t,n){var r=e.doc;if(n+=e.display.viewOffset,n<0)return hn(r.first,0,!0,-1);var i=F(r,n),o=r.first+r.size-1;if(i>o)return hn(r.first+r.size-1,S(r,o).text.length,!0,1);t<0&&(t=0);for(var a=S(r,i);;){var s=gn(e,a,i,t,n),l=ae(a),c=l&&l.find(0,!0);if(!l||!(s.ch>c.from.ch||s.ch==c.from.ch&&s.xRel>0))return s;i=L(a=c.to.line)}}function gn(e,t,n,r,i){function o(r){var i=pn(e,D(n,r),"line",t,c);return s=!0,a>i.bottom?i.left-l:a<i.top?i.left+l:(s=!1,i.left)}var a=i-he(t),s=!1,l=2*e.display.wrapper.clientWidth,c=Jt(e,t),u=Ae(t),f=t.text.length,p=be(t),d=we(t),h=o(p),m=s,g=o(d),v=s;if(r>g)return hn(n,d,v,1);for(;;){if(u?d==p||d==Se(t,p,1):d-p<=1){var y=r<h||r-h<=g-r?p:d,x=y==p?m:v,b=r-(y==p?h:g);if(v&&!u&&!/\s/.test(t.text.charAt(y))&&b>0&&y<t.text.length&&c.view.measure.heights.length>1){var w=Qt(e,c,y,"right");a<=w.bottom&&a>=w.top&&Math.abs(r-w.right)<b&&(x=!1,y++,b=r-w.right)}for(;_(t.text.charAt(y));)++y;var k=hn(n,y,x,b<-1?-1:b>1?1:0);return k}var C=Math.ceil(f/2),S=p+C;if(u){S=p;for(var T=0;T<C;++T)S=Se(t,S,1)}var A=o(S);A>r?(d=S,g=A,(v=s)&&(g+=1e3),f=C):(p=S,h=A,m=s,f-=C)}}function vn(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==Va){Va=r("pre");for(var i=0;i<49;++i)Va.appendChild(document.createTextNode("x")),Va.appendChild(r("br"));Va.appendChild(document.createTextNode("x"))}n(e.measure,Va);var o=Va.offsetHeight/50;return o>3&&(e.cachedTextHeight=o),t(e.measure),o||1}function yn(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=r("span","xxxxxxxxxx"),i=r("pre",[t]);n(e.measure,i);var o=t.getBoundingClientRect(),a=(o.right-o.left)/10;return a>2&&(e.cachedCharWidth=a),a||10}function xn(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,o=t.gutters.firstChild,a=0;o;o=o.nextSibling,++a)n[e.options.gutters[a]]=o.offsetLeft+o.clientLeft+i,r[e.options.gutters[a]]=o.clientWidth;return{fixedPos:bn(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function bn(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function wn(e){var t=vn(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/yn(e.display)-3);return function(i){if(pe(e.doc,i))return 0;var o=0;if(i.widgets)for(var a=0;a<i.widgets.length;a++)i.widgets[a].height&&(o+=i.widgets[a].height);return n?o+(Math.ceil(i.text.length/r)||1)*t:o+t}}function kn(e){var t=e.doc,n=wn(e);t.iter(function(e){var t=n(e);t!=e.height&&M(e,t)})}function _n(e,t,n,r){var i=e.display;if(!n&&"true"==qe(t).getAttribute("cm-not-content"))return null;var o,a,s=i.lineSpace.getBoundingClientRect();try{o=t.clientX-s.left,a=t.clientY-s.top}catch(e){return null}var l,c=mn(e,o,a);if(r&&1==c.xRel&&(l=S(e.doc,c.line).text).length==c.ch){var f=u(l,l.length,e.options.tabSize)-l.length;c=D(c.line,Math.max(0,Math.round((o-Ht(e.display).left)/yn(e.display))-f))}return c}function Cn(e,t){if(t>=e.display.viewTo)return null;if(t-=e.display.viewFrom,t<0)return null;for(var n=e.display.view,r=0;r<n.length;r++)if(t-=n[r].size,t<0)return r}function Sn(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Tn(e,t){for(var n=e.doc,r={},i=r.cursors=document.createDocumentFragment(),o=r.selection=document.createDocumentFragment(),a=0;a<n.sel.ranges.length;a++)if(t!==!1||a!=n.sel.primIndex){var s=n.sel.ranges[a];if(!(s.from().line>=e.display.viewTo||s.to().line<e.display.viewFrom)){var l=s.empty();(l||e.options.showCursorWhenSelecting)&&An(e,s.head,i),l||Mn(e,s,o)}}return r}function An(e,t,n){var i=pn(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),o=n.appendChild(r("div"," ","CodeMirror-cursor"));if(o.style.left=i.left+"px",o.style.top=i.top+"px",o.style.height=Math.max(0,i.bottom-i.top)*e.options.cursorHeight+"px",i.other){var a=n.appendChild(r("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));a.style.display="",a.style.left=i.other.left+"px",a.style.top=i.other.top+"px",a.style.height=.85*(i.other.bottom-i.other.top)+"px"}}function Mn(e,t,n){function i(e,t,n,i){t<0&&(t=0),t=Math.round(t),i=Math.round(i),l.appendChild(r("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n                             top: "+t+"px; width: "+(null==n?f-e:n)+"px;\n                             height: "+(i-t)+"px"))}function o(t,n,r){function o(n,r){return fn(e,D(t,n),"div",c,r)}var a,l,c=S(s,t),p=c.text.length;return ve(Ae(c),n||0,null==r?p:r,function(e,t,s){var c,d,h,m=o(e,"left");if(e==t)c=m,d=h=m.left;else{if(c=o(t-1,"right"),"rtl"==s){var g=m;m=c,c=g}d=m.left,h=c.right}null==n&&0==e&&(d=u),c.top-m.top>3&&(i(d,m.top,null,m.bottom),d=u,m.bottom<c.top&&i(d,m.bottom,null,c.top)),null==r&&t==p&&(h=f),(!a||m.top<a.top||m.top==a.top&&m.left<a.left)&&(a=m),(!l||c.bottom>l.bottom||c.bottom==l.bottom&&c.right>l.right)&&(l=c),d<u+1&&(d=u),i(d,c.top,h-d,c.bottom)}),{start:a,end:l}}var a=e.display,s=e.doc,l=document.createDocumentFragment(),c=Ht(e.display),u=c.left,f=Math.max(a.sizerWidth,$t(e)-a.sizer.offsetLeft)-c.right,p=t.from(),d=t.to();if(p.line==d.line)o(p.line,p.ch,d.ch);else{var h=S(s,p.line),m=S(s,d.line),g=le(h)==le(m),v=o(p.line,p.ch,g?h.text.length+1:null).end,y=o(d.line,g?0:null,d.ch).start;g&&(v.top<y.top-2?(i(v.right,v.top,null,v.bottom),i(u,y.top,y.left,y.bottom)):i(v.right,v.top,y.left-v.right,v.bottom)),v.bottom<y.top&&i(u,v.bottom,null,y.top)}n.appendChild(l)}function Ln(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var n=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){return t.cursorDiv.style.visibility=(n=!n)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Fn(e){e.state.focused||(e.display.input.focus(),En(e))}function On(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Dn(e))},100)}function En(e,t){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(Fe(e,"focus",e,t),e.state.focused=!0,a(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),ia&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Ln(e))}function Dn(e,t){e.state.delayingBlurEvent||(e.state.focused&&(Fe(e,"blur",e,t),e.state.focused=!1,ba(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function Nn(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=bn(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=r+"px",a=0;a<n.length;a++)if(!n[a].hidden){e.options.fixedGutter&&(n[a].gutter&&(n[a].gutter.style.left=o),n[a].gutterBackground&&(n[a].gutterBackground.style.left=o));var s=n[a].alignable;if(s)for(var l=0;l<s.length;l++)s[l].style.left=o}e.options.fixedGutter&&(t.gutters.style.left=r+i+"px")}}function jn(e){if(!e.options.lineNumbers)return!1;var t=e.doc,n=E(e.options,t.first+t.size-1),i=e.display;if(n.length!=i.lineNumChars){var o=i.measure.appendChild(r("div",[r("div",n)],"CodeMirror-linenumber CodeMirror-gutter-elt")),a=o.firstChild.offsetWidth,s=o.offsetWidth-a;return i.lineGutter.style.width="",i.lineNumInnerWidth=Math.max(a,i.lineGutter.offsetWidth-s)+1,i.lineNumWidth=i.lineNumInnerWidth+s,i.lineNumChars=i.lineNumInnerWidth?n.length:-1,i.lineGutter.style.width=i.lineNumWidth+"px",Tr(e),!0}return!1}function Pn(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=0;r<t.view.length;r++){var i=t.view[r],o=void 0;if(!i.hidden){if(na&&ra<8){var a=i.node.offsetTop+i.node.offsetHeight;o=a-n,n=a}else{var s=i.node.getBoundingClientRect();o=s.bottom-s.top}var l=i.line.height-o;if(o<2&&(o=vn(t)),(l>.001||l<-.001)&&(M(i.line,o),In(i.line),i.rest))for(var c=0;c<i.rest.length;c++)In(i.rest[c])}}}function In(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t)e.widgets[t].height=e.widgets[t].node.parentNode.offsetHeight}function Rn(e,t,n){var r=n&&null!=n.top?Math.max(0,n.top):e.scroller.scrollTop;r=Math.floor(r-Bt(e));var i=n&&null!=n.bottom?n.bottom:r+e.wrapper.clientHeight,o=F(t,r),a=F(t,i);if(n&&n.ensure){var s=n.ensure.from.line,l=n.ensure.to.line;s<o?(o=s,a=F(t,he(S(t,s))+e.wrapper.clientHeight)):Math.min(l,t.lastLine())>=a&&(o=F(t,he(S(t,l))-e.wrapper.clientHeight),a=l)}return{from:o,to:Math.max(a,o+1)}}function qn(e,t){Math.abs(e.doc.scrollTop-t)<2||(e.doc.scrollTop=t,Zo||Cr(e,{top:t}),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t),e.display.scrollbars.setScrollTop(t),Zo&&Cr(e),xr(e,100))}function Bn(e,t,n){(n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)||(t=Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth),e.doc.scrollLeft=t,Nn(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function zn(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==n&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:null==n&&(n=e.wheelDelta),{x:t,y:n}}function Hn(e){var t=zn(e);return t.x*=es,t.y*=es,t}function Wn(e,t){var n=zn(t),r=n.x,i=n.y,o=e.display,a=o.scroller,s=a.scrollWidth>a.clientWidth,l=a.scrollHeight>a.clientHeight;if(r&&s||i&&l){if(i&&da&&ia)e:for(var c=t.target,u=o.view;c!=a;c=c.parentNode)for(var f=0;f<u.length;f++)if(u[f].node==c){e.display.currentWheelTarget=c;break e}if(r&&!Zo&&!sa&&null!=es)return i&&l&&qn(e,Math.max(0,Math.min(a.scrollTop+i*es,a.scrollHeight-a.clientHeight))),Bn(e,Math.max(0,Math.min(a.scrollLeft+r*es,a.scrollWidth-a.clientWidth))),(!i||i&&l)&&je(t),void(o.wheelStartX=null);if(i&&null!=es){var p=i*es,d=e.doc.scrollTop,h=d+o.wrapper.clientHeight;p<0?d=Math.max(0,d+p-50):h=Math.min(e.doc.height,h+p+50),Cr(e,{top:d,bottom:h})}Za<20&&(null==o.wheelStartX?(o.wheelStartX=a.scrollLeft,o.wheelStartY=a.scrollTop,o.wheelDX=r,o.wheelDY=i,setTimeout(function(){if(null!=o.wheelStartX){var e=a.scrollLeft-o.wheelStartX,t=a.scrollTop-o.wheelStartY,n=t&&o.wheelDY&&t/o.wheelDY||e&&o.wheelDX&&e/o.wheelDX;o.wheelStartX=o.wheelStartY=null,n&&(es=(es*Za+n)/(Za+1),++Za)}},200)):(o.wheelDX+=r,o.wheelDY+=i))}}function $n(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+zt(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+Wt(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}function Kn(e,t){t||(t=$n(e));var n=e.display.barWidth,r=e.display.barHeight;Un(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&Pn(e),Un(e,$n(e)),n=e.display.barWidth,r=e.display.barHeight}function Un(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}function Vn(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&ba(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new rs[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),Ia(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,n){"horizontal"==n?Bn(e,t):qn(e,t)},e),e.display.scrollbars.addClass&&a(e.display.wrapper,e.display.scrollbars.addClass)}function Gn(e,t){if(!Oe(e,"scrollCursorIntoView")){var n=e.display,i=n.sizer.getBoundingClientRect(),o=null;if(t.top+i.top<0?o=!0:t.bottom+i.top>(window.innerHeight||document.documentElement.clientHeight)&&(o=!1),null!=o&&!ua){var a=r("div","​",null,"position: absolute;\n                         top: "+(t.top-n.viewOffset-Bt(e.display))+"px;\n                         height: "+(t.bottom-t.top+Wt(e)+n.barHeight)+"px;\n                         left: "+t.left+"px; width: 2px;");e.display.lineSpace.appendChild(a),a.scrollIntoView(o),e.display.lineSpace.removeChild(a)}}}function Xn(e,t,n,r){null==r&&(r=0);for(var i,o=0;o<5;o++){var a=!1;i=pn(e,t);var s=n&&n!=t?pn(e,n):i,l=Jn(e,Math.min(i.left,s.left),Math.min(i.top,s.top)-r,Math.max(i.left,s.left),Math.max(i.bottom,s.bottom)+r),c=e.doc.scrollTop,u=e.doc.scrollLeft;if(null!=l.scrollTop&&(qn(e,l.scrollTop),Math.abs(e.doc.scrollTop-c)>1&&(a=!0)),null!=l.scrollLeft&&(Bn(e,l.scrollLeft),Math.abs(e.doc.scrollLeft-u)>1&&(a=!0)),!a)break}return i}function Yn(e,t,n,r,i){var o=Jn(e,t,n,r,i);null!=o.scrollTop&&qn(e,o.scrollTop),null!=o.scrollLeft&&Bn(e,o.scrollLeft)}function Jn(e,t,n,r,i){var o=e.display,a=vn(e.display);n<0&&(n=0);var s=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:o.scroller.scrollTop,l=Kt(e),c={};i-n>l&&(i=n+l);var u=e.doc.height+zt(o),f=n<a,p=i>u-a;if(n<s)c.scrollTop=f?0:n;else if(i>s+l){var d=Math.min(n,(p?u:i)-l);d!=s&&(c.scrollTop=d)}var h=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:o.scroller.scrollLeft,m=$t(e)-(e.options.fixedGutter?o.gutters.offsetWidth:0),g=r-t>m;return g&&(r=t+m),t<10?c.scrollLeft=0:t<h?c.scrollLeft=Math.max(0,t-(g?0:10)):r>m+h-3&&(c.scrollLeft=r+(g?0:10)-m),c}function Qn(e,t,n){null==t&&null==n||er(e),null!=t&&(e.curOp.scrollLeft=(null==e.curOp.scrollLeft?e.doc.scrollLeft:e.curOp.scrollLeft)+t),null!=n&&(e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+n)}function Zn(e){er(e);var t=e.getCursor(),n=t,r=t;e.options.lineWrapping||(n=t.ch?D(t.line,t.ch-1):t,r=D(t.line,t.ch+1)),e.curOp.scrollToPos={from:n,to:r,margin:e.options.cursorScrollMargin,isCursor:!0}}function er(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var n=dn(e,t.from),r=dn(e,t.to),i=Jn(e,Math.min(n.left,r.left),Math.min(n.top,r.top)-t.margin,Math.max(n.right,r.right),Math.max(n.bottom,r.bottom)+t.margin);e.scrollTo(i.scrollLeft,i.scrollTop)}}function tr(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++is},wt(e.curOp)}function nr(e){var t=e.curOp;_t(t,function(e){for(var t=0;t<e.ops.length;t++)e.ops[t].cm.curOp=null;rr(e)})}function rr(e){for(var t=e.ops,n=0;n<t.length;n++)ir(t[n]);for(var r=0;r<t.length;r++)or(t[r]);for(var i=0;i<t.length;i++)ar(t[i]);for(var o=0;o<t.length;o++)sr(t[o]);for(var a=0;a<t.length;a++)lr(t[a])}function ir(e){var t=e.cm,n=t.display;wr(t),e.updateMaxLine&&ge(t),e.mustUpdate=e.viewChanged||e.forceUpdate||null!=e.scrollTop||e.scrollToPos&&(e.scrollToPos.from.line<n.viewFrom||e.scrollToPos.to.line>=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new os(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function or(e){e.updatedDisplay=e.mustUpdate&&kr(e.cm,e.update)}function ar(e){var t=e.cm,n=t.display;e.updatedDisplay&&Pn(t),e.barMeasure=$n(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Xt(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+Wt(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-$t(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection(e.focus))}function sr(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&Bn(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var n=e.focus&&e.focus==o()&&(!document.hasFocus||document.hasFocus());e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,n),(e.updatedDisplay||e.startHeight!=t.doc.height)&&Kn(t,e.barMeasure),e.updatedDisplay&&Ar(t,e.barMeasure),e.selectionChanged&&Ln(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),n&&Fn(e.cm)}function lr(e){var t=e.cm,n=t.display,r=t.doc;if(e.updatedDisplay&&_r(t,e.update),null==n.wheelStartX||null==e.scrollTop&&null==e.scrollLeft&&!e.scrollToPos||(n.wheelStartX=n.wheelStartY=null),null==e.scrollTop||n.scroller.scrollTop==e.scrollTop&&!e.forceScroll||(r.scrollTop=Math.max(0,Math.min(n.scroller.scrollHeight-n.scroller.clientHeight,e.scrollTop)),n.scrollbars.setScrollTop(r.scrollTop),n.scroller.scrollTop=r.scrollTop),null==e.scrollLeft||n.scroller.scrollLeft==e.scrollLeft&&!e.forceScroll||(r.scrollLeft=Math.max(0,Math.min(n.scroller.scrollWidth-n.scroller.clientWidth,e.scrollLeft)),n.scrollbars.setScrollLeft(r.scrollLeft),n.scroller.scrollLeft=r.scrollLeft,Nn(t)),e.scrollToPos){var i=Xn(t,q(r,e.scrollToPos.from),q(r,e.scrollToPos.to),e.scrollToPos.margin);e.scrollToPos.isCursor&&t.state.focused&&Gn(t,i)}var o=e.maybeHiddenMarkers,a=e.maybeUnhiddenMarkers;if(o)for(var s=0;s<o.length;++s)o[s].lines.length||Fe(o[s],"hide");if(a)for(var l=0;l<a.length;++l)a[l].lines.length&&Fe(a[l],"unhide");n.wrapper.offsetHeight&&(r.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&Fe(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function cr(e,t){if(e.curOp)return t();tr(e);try{return t()}finally{nr(e)}}function ur(e,t){return function(){if(e.curOp)return t.apply(e,arguments);tr(e);try{return t.apply(e,arguments)}finally{nr(e)}}}function fr(e){return function(){if(this.curOp)return e.apply(this,arguments);tr(this);try{return e.apply(this,arguments)}finally{nr(this)}}}function pr(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);tr(t);try{return e.apply(this,arguments)}finally{nr(t)}}}function dr(e,t,n,r){null==t&&(t=e.doc.first),null==n&&(n=e.doc.first+e.doc.size),r||(r=0);var i=e.display;if(r&&n<i.viewTo&&(null==i.updateLineNumbers||i.updateLineNumbers>t)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Da&&ue(e.doc,t)<i.viewTo&&mr(e);else if(n<=i.viewFrom)Da&&fe(e.doc,n+r)>i.viewFrom?mr(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)mr(e);else if(t<=i.viewFrom){var o=gr(e,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):mr(e)}else if(n>=i.viewTo){var a=gr(e,t,t,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):mr(e)}else{var s=gr(e,t,t,-1),l=gr(e,n,n+r,1);s&&l?(i.view=i.view.slice(0,s.index).concat(bt(e,s.lineN,l.lineN)).concat(i.view.slice(l.index)),i.viewTo+=r):mr(e)}var c=i.externalMeasured;c&&(n<c.lineN?c.lineN+=r:t<c.lineN+c.size&&(i.externalMeasured=null))}function hr(e,t,n){e.curOp.viewChanged=!0;var r=e.display,i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size&&(r.externalMeasured=null),!(t<r.viewFrom||t>=r.viewTo)){var o=r.view[Cn(e,t)];if(null!=o.node){var a=o.changes||(o.changes=[]);p(a,n)==-1&&a.push(n)}}}function mr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function gr(e,t,n,r){var i,o=Cn(e,t),a=e.display.view;if(!Da||n==e.doc.first+e.doc.size)return{index:o,lineN:n};for(var s=e.display.viewFrom,l=0;l<o;l++)s+=a[l].size;if(s!=t){if(r>0){if(o==a.length-1)return null;i=s+a[o].size-t,o++}else i=s-t;t+=i,n+=i}for(;ue(e.doc,n)!=n;){if(o==(r<0?0:a.length-1))return null;n+=r*a[o-(r<0?1:0)].size,o+=r}return{index:o,lineN:n}}function vr(e,t,n){var r=e.display,i=r.view;0==i.length||t>=r.viewTo||n<=r.viewFrom?(r.view=bt(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=bt(e,t,r.viewFrom).concat(r.view):r.viewFrom<t&&(r.view=r.view.slice(Cn(e,t))),r.viewFrom=t,r.viewTo<n?r.view=r.view.concat(bt(e,r.viewTo,n)):r.viewTo>n&&(r.view=r.view.slice(0,Cn(e,n)))),r.viewTo=n}function yr(e){for(var t=e.display.view,n=0,r=0;r<t.length;r++){var i=t[r];i.hidden||i.node&&!i.changes||++n}return n}function xr(e,t){e.doc.mode.startState&&e.doc.frontier<e.display.viewTo&&e.state.highlight.set(t,l(br,e))}function br(e){var t=e.doc;if(t.frontier<t.first&&(t.frontier=t.first),!(t.frontier>=e.display.viewTo)){var n=+new Date+e.options.workTime,r=Xe(t.mode,et(e,t.frontier)),i=[];t.iter(t.frontier,Math.min(t.first+t.size,e.display.viewTo+500),function(o){if(t.frontier>=e.display.viewFrom){var a=o.styles,s=o.text.length>e.options.maxHighlightLength,l=Qe(e,o,s?Xe(t.mode,r):r,!0);o.styles=l.styles;var c=o.styleClasses,u=l.classes;u?o.styleClasses=u:c&&(o.styleClasses=null);for(var f=!a||a.length!=o.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),p=0;!f&&p<a.length;++p)f=a[p]!=o.styles[p];f&&i.push(t.frontier),o.stateAfter=s?r:Xe(t.mode,r)}else o.text.length<=e.options.maxHighlightLength&&tt(e,o.text,r),o.stateAfter=t.frontier%5==0?Xe(t.mode,r):null;if(++t.frontier,+new Date>n)return xr(e,e.options.workDelay),!0}),i.length&&cr(e,function(){for(var t=0;t<i.length;t++)hr(e,i[t],"text")})}}function wr(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=Wt(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=Wt(e)+"px",t.scrollbarsClipped=!0)}function kr(e,n){var r=e.display,i=e.doc;if(n.editorIsHidden)return mr(e),!1;if(!n.force&&n.visible.from>=r.viewFrom&&n.visible.to<=r.viewTo&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo)&&r.renderedView==r.view&&0==yr(e))return!1;jn(e)&&(mr(e),n.dims=xn(e));var a=i.first+i.size,s=Math.max(n.visible.from-e.options.viewportMargin,i.first),l=Math.min(a,n.visible.to+e.options.viewportMargin);r.viewFrom<s&&s-r.viewFrom<20&&(s=Math.max(i.first,r.viewFrom)),r.viewTo>l&&r.viewTo-l<20&&(l=Math.min(a,r.viewTo)),Da&&(s=ue(e.doc,s),l=fe(e.doc,l));var c=s!=r.viewFrom||l!=r.viewTo||r.lastWrapHeight!=n.wrapperHeight||r.lastWrapWidth!=n.wrapperWidth;vr(e,s,l),r.viewOffset=he(S(e.doc,r.viewFrom)),e.display.mover.style.top=r.viewOffset+"px";var u=yr(e);if(!c&&0==u&&!n.force&&r.renderedView==r.view&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo))return!1;var f=o();return u>4&&(r.lineDiv.style.display="none"),Sr(e,r.updateLineNumbers,n.dims),u>4&&(r.lineDiv.style.display=""),r.renderedView=r.view,f&&o()!=f&&f.offsetHeight&&f.focus(),t(r.cursorDiv),t(r.selectionDiv),r.gutters.style.height=r.sizer.style.minHeight=0,c&&(r.lastWrapHeight=n.wrapperHeight,r.lastWrapWidth=n.wrapperWidth,xr(e,400)),r.updateLineNumbers=null,!0}function _r(e,t){for(var n=t.viewport,r=!0;(r&&e.options.lineWrapping&&t.oldDisplayWidth!=$t(e)||(n&&null!=n.top&&(n={top:Math.min(e.doc.height+zt(e.display)-Kt(e),n.top)}),t.visible=Rn(e.display,e.doc,n),!(t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)))&&kr(e,t);r=!1){Pn(e);var i=$n(e);Sn(e),Kn(e,i),Ar(e,i)}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function Cr(e,t){var n=new os(e,t);if(kr(e,n)){Pn(e),_r(e,n);var r=$n(e);Sn(e),Kn(e,r),Ar(e,r),n.finish()}}function Sr(e,n,r){function i(t){var n=t.nextSibling;return ia&&da&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),n}for(var o=e.display,a=e.options.lineNumbers,s=o.lineDiv,l=s.firstChild,c=o.view,u=o.viewFrom,f=0;f<c.length;f++){var d=c[f];if(d.hidden);else if(d.node&&d.node.parentNode==s){for(;l!=d.node;)l=i(l);var h=a&&null!=n&&n<=u&&d.lineNumber;d.changes&&(p(d.changes,"gutter")>-1&&(h=!1),Tt(e,d,u,r)),h&&(t(d.lineNumber),d.lineNumber.appendChild(document.createTextNode(E(e.options,u)))),l=d.node.nextSibling}else{var m=Nt(e,d,u,r);s.insertBefore(m,l)}u+=d.size}for(;l;)l=i(l)}function Tr(e){var t=e.display.gutters.offsetWidth;e.display.sizer.style.marginLeft=t+"px"}function Ar(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",
0 ignored issues
show
Bug introduced by
The variable l seems to not be initialized for all possible execution paths.
Loading history...
Bug introduced by
The variable a seems to not be initialized for all possible execution paths.
Loading history...
Bug introduced by
The variable s seems to not be initialized for all possible execution paths.
Loading history...
Bug introduced by
The variable o seems to not be initialized for all possible execution paths.
Loading history...
Complexity Best Practice introduced by
There is no return statement if r && s || i && l is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Bug introduced by
The variable r seems to not be initialized for all possible execution paths.
Loading history...
Bug introduced by
The variable f seems to not be initialized for all possible execution paths.
Loading history...
Comprehensibility Best Practice introduced by
The name e is already used for a variable on line 2. Please consider using another name to prevent misunderstandings.
Loading history...
Comprehensibility introduced by
Usage of the sequence operator is discouraged, since it may lead to obfuscated code.

The sequence or comma operator allows the inclusion of multiple expressions where only is permitted. The result of the sequence is the value of the last expression.

This operator is most often used in for statements.

Used in another places it can make code hard to read, especially when people do not realize it even exists as a seperate operator.

This check looks for usage of the sequence operator in locations where it is not necessary and could be replaced by a series of expressions or statements.

var a,b,c;

a = 1, b = 1,  c= 3;

could just as well be written as:

var a,b,c;

a = 1;
b = 1;
c = 3;

To learn more about the sequence operator, please refer to the MDN.

Loading history...
Coding Style Best Practice introduced by
By convention, constructors like os should be capitalized.
Loading history...
Bug introduced by
The variable screen seems to be never declared. If this is a global, consider adding a /** global: screen */ comment.

This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.

To learn more about declaring variables in Javascript, see the MDN.

Loading history...
introduced by
The for loop does not have a body. Maybe you have misplaced a semicolon. If you do wish to have a loop without a body, use an empty body {}.
Loading history...
Coding Style Best Practice introduced by
Curly braces around statements make for more readable code and help prevent bugs when you add further statements.

Consider adding curly braces around all statements when they are executed conditionally. This is optional if there is only one statement, but leaving them out can lead to unexpected behaviour if another statement is added later.

Consider:

if (a > 0)
    b = 42;

If you or someone else later decides to put another statement in, only the first statement will be executed.

if (a > 0)
    console.log("a > 0");
    b = 42;

In this case the statement b = 42 will always be executed, while the logging statement will be executed conditionally.

if (a > 0) {
    console.log("a > 0");
    b = 42;
}

ensures that the proper code will be executed conditionally no matter how many statements are added or removed.

Loading history...
Bug introduced by
The variable i seems to not be initialized for all possible execution paths. Are you sure nn handles undefined variables?
Loading history...
Coding Style Best Practice introduced by
By convention, constructors like xt should be capitalized.
Loading history...
Unused Code introduced by
The assignment to variable t seems to be never used. Consider removing it.
Loading history...
Coding Style introduced by
Consider using undefined instead of void(0). It is equivalent and more straightforward to read.
Loading history...
Complexity Best Practice introduced by
There is no return statement if ++t.frontier, +(new Date()) > n is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Unused Code introduced by
The assignment to variable o seems to be never used. Consider removing it.
Loading history...
Best Practice introduced by
There is no return statement in this branch, but you do return something in other branches. Did you maybe miss it? If you do not want to return anything, consider adding return undefined; explicitly.
Loading history...
Bug introduced by
The variable Va does not seem to be initialized in case null == Va on line 2 is false. Are you sure the function n handles undefined variables?
Loading history...
Bug introduced by
The variable i seems to not be initialized for all possible execution paths.
Loading history...
3
e.display.gutters.style.height=t.docHeight+e.display.barHeight+Wt(e)+"px"}function Mr(e){var n=e.display.gutters,i=e.options.gutters;t(n);for(var o=0;o<i.length;++o){var a=i[o],s=n.appendChild(r("div",null,"CodeMirror-gutter "+a));"CodeMirror-linenumbers"==a&&(e.display.lineGutter=s,s.style.width=(e.display.lineNumWidth||1)+"px")}n.style.display=o?"":"none",Tr(e)}function Lr(e){var t=p(e.gutters,"CodeMirror-linenumbers");t==-1&&e.lineNumbers?e.gutters=e.gutters.concat(["CodeMirror-linenumbers"]):t>-1&&!e.lineNumbers&&(e.gutters=e.gutters.slice(0),e.gutters.splice(t,1))}function Fr(e,t){this.ranges=e,this.primIndex=t}function Or(e,t){this.anchor=e,this.head=t}function Er(e,t){var n=e[t];e.sort(function(e,t){return N(e.from(),t.from())}),t=p(e,n);for(var r=1;r<e.length;r++){var i=e[r],o=e[r-1];if(N(o.to(),i.from())>=0){var a=I(o.from(),i.from()),s=P(o.to(),i.to()),l=o.empty()?i.from()==i.head:o.from()==o.head;r<=t&&--t,e.splice(--r,2,new Or(l?s:a,l?a:s))}}return new Fr(e,t)}function Dr(e,t){return new Fr([new Or(e,t||e)],0)}function Nr(e){return e.text?D(e.from.line+e.text.length-1,m(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function jr(e,t){if(N(e,t.from)<0)return e;if(N(e,t.to)<=0)return Nr(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=Nr(t).ch-t.to.ch),D(n,r)}function Pr(e,t){for(var n=[],r=0;r<e.sel.ranges.length;r++){var i=e.sel.ranges[r];n.push(new Or(jr(i.anchor,t),jr(i.head,t)))}return Er(n,e.sel.primIndex)}function Ir(e,t,n){return e.line==t.line?D(n.line,e.ch-t.ch+n.ch):D(n.line+(e.line-t.line),e.ch)}function Rr(e,t,n){for(var r=[],i=D(e.first,0),o=i,a=0;a<t.length;a++){var s=t[a],l=Ir(s.from,i,o),c=Ir(Nr(s),i,o);if(i=s.to,o=c,"around"==n){var u=e.sel.ranges[a],f=N(u.head,u.anchor)<0;r[a]=new Or(f?c:l,f?l:c)}else r[a]=new Or(l,l)}return new Fr(r,e.sel.primIndex)}function qr(e){e.doc.mode=Ve(e.options,e.doc.modeOption),Br(e)}function Br(e){e.doc.iter(function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)}),e.doc.frontier=e.doc.first,xr(e,100),e.state.modeGen++,e.curOp&&dr(e)}function zr(e,t){return 0==t.from.ch&&0==t.to.ch&&""==m(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Hr(e,t,n,r){function i(e){return n?n[e]:null}function o(e,n,i){ct(e,n,i,r),Ct(e,"change",e,t)}function a(e,t){for(var n=[],o=e;o<t;++o)n.push(new lt(c[o],i(o),r));return n}var s=t.from,l=t.to,c=t.text,u=S(e,s.line),f=S(e,l.line),p=m(c),d=i(c.length-1),h=l.line-s.line;if(t.full)e.insert(0,a(0,c.length)),e.remove(c.length,e.size-c.length);else if(zr(e,t)){var g=a(0,c.length-1);o(f,f.text,d),h&&e.remove(s.line,h),g.length&&e.insert(s.line,g)}else if(u==f)if(1==c.length)o(u,u.text.slice(0,s.ch)+p+u.text.slice(l.ch),d);else{var v=a(1,c.length-1);v.push(new lt(p+u.text.slice(l.ch),d,r)),o(u,u.text.slice(0,s.ch)+c[0],i(0)),e.insert(s.line+1,v)}else if(1==c.length)o(u,u.text.slice(0,s.ch)+c[0]+f.text.slice(l.ch),i(0)),e.remove(s.line+1,h);else{o(u,u.text.slice(0,s.ch)+c[0],i(0)),o(f,p+f.text.slice(l.ch),d);var y=a(1,c.length-1);h>1&&e.remove(s.line+1,h-1),e.insert(s.line+1,y)}Ct(e,"change",e,t)}function Wr(e,t,n){function r(e,i,o){if(e.linked)for(var a=0;a<e.linked.length;++a){var s=e.linked[a];if(s.doc!=i){var l=o&&s.sharedHist;n&&!l||(t(s.doc,l),r(s.doc,e,l))}}}r(e,null,!0)}function $r(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,kn(e),qr(e),e.options.lineWrapping||ge(e),e.options.mode=t.modeOption,dr(e)}function Kr(e){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e||1}function Ur(e,t){var n={from:j(t.from),to:Nr(t),text:T(e,t.from,t.to)};return Zr(e,n,t.from.line,t.to.line+1),Wr(e,function(e){return Zr(e,n,t.from.line,t.to.line+1)},!0),n}function Vr(e){for(;e.length;){var t=m(e);if(!t.ranges)break;e.pop()}}function Gr(e,t){return t?(Vr(e.done),m(e.done)):e.done.length&&!m(e.done).ranges?m(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),m(e.done)):void 0}function Xr(e,t,n,r){var i=e.history;i.undone.length=0;var o,a,s=+new Date;if((i.lastOp==r||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&e.cm&&i.lastModTime>s-e.cm.options.historyEventDelay||"*"==t.origin.charAt(0)))&&(o=Gr(i,i.lastOp==r)))a=m(o.changes),0==N(t.from,t.to)&&0==N(t.from,a.to)?a.to=Nr(t):o.changes.push(Ur(e,t));else{var l=m(i.done);for(l&&l.ranges||Qr(e.sel,i.done),o={changes:[Ur(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=s,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,a||Fe(e,"historyAdded")}function Yr(e,t,n,r){var i=t.charAt(0);return"*"==i||"+"==i&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function Jr(e,t,n,r){var i=e.history,o=r&&r.origin;n==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||Yr(e,o,m(i.done),t))?i.done[i.done.length-1]=t:Qr(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&r.clearRedo!==!1&&Vr(i.undone)}function Qr(e,t){var n=m(t);n&&n.ranges&&n.equals(e)||t.push(e)}function Zr(e,t,n,r){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),function(n){n.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=n.markedSpans),++o})}function ei(e){if(!e)return null;for(var t,n=0;n<e.length;++n)e[n].marker.explicitlyCleared?t||(t=e.slice(0,n)):t&&t.push(e[n]);return t?t.length?t:null:e}function ti(e,t){var n=t["spans_"+e.id];if(!n)return null;for(var r=[],i=0;i<t.text.length;++i)r.push(ei(n[i]));return r}function ni(e,t){var n=ti(e,t),r=Y(e,t);if(!n)return r;if(!r)return n;for(var i=0;i<n.length;++i){var o=n[i],a=r[i];if(o&&a)e:for(var s=0;s<a.length;++s){for(var l=a[s],c=0;c<o.length;++c)if(o[c].marker==l.marker)continue e;o.push(l)}else a&&(n[i]=a)}return n}function ri(e,t,n){for(var r=[],i=0;i<e.length;++i){var o=e[i];if(o.ranges)r.push(n?Fr.prototype.deepCopy.call(o):o);else{var a=o.changes,s=[];r.push({changes:s});for(var l=0;l<a.length;++l){var c=a[l],u=void 0;if(s.push({from:c.from,to:c.to,text:c.text}),t)for(var f in c)(u=f.match(/^spans_(\d+)$/))&&p(t,Number(u[1]))>-1&&(m(s)[f]=c[f],delete c[f])}}}return r}function ii(e,t,n,r){if(e.cm&&e.cm.display.shift||e.extend){var i=t.anchor;if(r){var o=N(n,i)<0;o!=N(r,i)<0?(i=n,n=r):o!=N(n,r)<0&&(n=r)}return new Or(i,n)}return new Or(r||n,n)}function oi(e,t,n,r){fi(e,new Fr([ii(e,e.sel.primary(),t,n)],0),r)}function ai(e,t,n){for(var r=[],i=0;i<e.sel.ranges.length;i++)r[i]=ii(e,e.sel.ranges[i],t[i],null);var o=Er(r,e.sel.primIndex);fi(e,o,n)}function si(e,t,n,r){var i=e.sel.ranges.slice(0);i[t]=n,fi(e,Er(i,e.sel.primIndex),r)}function li(e,t,n,r){fi(e,Dr(t,n),r)}function ci(e,t,n){var r={ranges:t.ranges,update:function(t){var n=this;this.ranges=[];for(var r=0;r<t.length;r++)n.ranges[r]=new Or(q(e,t[r].anchor),q(e,t[r].head))},origin:n&&n.origin};return Fe(e,"beforeSelectionChange",e,r),e.cm&&Fe(e.cm,"beforeSelectionChange",e.cm,r),r.ranges!=t.ranges?Er(r.ranges,r.ranges.length-1):t}function ui(e,t,n){var r=e.history.done,i=m(r);i&&i.ranges?(r[r.length-1]=t,pi(e,t,n)):fi(e,t,n)}function fi(e,t,n){pi(e,t,n),Jr(e,e.sel,e.cm?e.cm.curOp.id:NaN,n)}function pi(e,t,n){(De(e,"beforeSelectionChange")||e.cm&&De(e.cm,"beforeSelectionChange"))&&(t=ci(e,t,n));var r=n&&n.bias||(N(t.primary().head,e.sel.primary().head)<0?-1:1);di(e,mi(e,t,r,!0)),n&&n.scroll===!1||!e.cm||Zn(e.cm)}function di(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=e.cm.curOp.selectionChanged=!0,Ee(e.cm)),Ct(e,"cursorActivity",e))}function hi(e){di(e,mi(e,e.sel,null,!1),Ta)}function mi(e,t,n,r){for(var i,o=0;o<t.ranges.length;o++){var a=t.ranges[o],s=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[o],l=vi(e,a.anchor,s&&s.anchor,n,r),c=vi(e,a.head,s&&s.head,n,r);(i||l!=a.anchor||c!=a.head)&&(i||(i=t.ranges.slice(0,o)),i[o]=new Or(l,c))}return i?Er(i,t.primIndex):t}function gi(e,t,n,r,i){var o=S(e,t.line);if(o.markedSpans)for(var a=0;a<o.markedSpans.length;++a){var s=o.markedSpans[a],l=s.marker;if((null==s.from||(l.inclusiveLeft?s.from<=t.ch:s.from<t.ch))&&(null==s.to||(l.inclusiveRight?s.to>=t.ch:s.to>t.ch))){if(i&&(Fe(l,"beforeCursorEnter"),l.explicitlyCleared)){if(o.markedSpans){--a;continue}break}if(!l.atomic)continue;if(n){var c=l.find(r<0?1:-1),u=void 0;if((r<0?l.inclusiveRight:l.inclusiveLeft)&&(c=yi(e,c,-r,c&&c.line==t.line?o:null)),c&&c.line==t.line&&(u=N(c,n))&&(r<0?u<0:u>0))return gi(e,c,t,r,i)}var f=l.find(r<0?-1:1);return(r<0?l.inclusiveLeft:l.inclusiveRight)&&(f=yi(e,f,r,f.line==t.line?o:null)),f?gi(e,f,t,r,i):null}}return t}function vi(e,t,n,r,i){var o=r||1,a=gi(e,t,n,o,i)||!i&&gi(e,t,n,o,!0)||gi(e,t,n,-o,i)||!i&&gi(e,t,n,-o,!0);return a?a:(e.cantEdit=!0,D(e.first,0))}function yi(e,t,n,r){return n<0&&0==t.ch?t.line>e.first?q(e,D(t.line-1)):null:n>0&&t.ch==(r||S(e,t.line)).text.length?t.line<e.first+e.size-1?D(t.line+1,0):null:new D(t.line,t.ch+n)}function xi(e){e.setSelection(D(e.firstLine(),0),D(e.lastLine()),Ta)}function bi(e,t,n){var r={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return r.canceled=!0}};return n&&(r.update=function(t,n,i,o){t&&(r.from=q(e,t)),n&&(r.to=q(e,n)),i&&(r.text=i),void 0!==o&&(r.origin=o)}),Fe(e,"beforeChange",e,r),e.cm&&Fe(e.cm,"beforeChange",e.cm,r),r.canceled?null:{from:r.from,to:r.to,text:r.text,origin:r.origin}}function wi(e,t,n){if(e.cm){if(!e.cm.curOp)return ur(e.cm,wi)(e,t,n);if(e.cm.state.suppressEdits)return}if(!(De(e,"beforeChange")||e.cm&&De(e.cm,"beforeChange"))||(t=bi(e,t,!0))){var r=Ea&&!n&&Q(e,t.from,t.to);if(r)for(var i=r.length-1;i>=0;--i)ki(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text});else ki(e,t)}}function ki(e,t){if(1!=t.text.length||""!=t.text[0]||0!=N(t.from,t.to)){var n=Pr(e,t);Xr(e,t,n,e.cm?e.cm.curOp.id:NaN),Si(e,t,n,Y(e,t));var r=[];Wr(e,function(e,n){n||p(r,e.history)!=-1||(Fi(e.history,t),r.push(e.history)),Si(e,t,null,Y(e,t))})}}function _i(e,t,n){if(!e.cm||!e.cm.state.suppressEdits||n){for(var r,i=e.history,o=e.sel,a="undo"==t?i.done:i.undone,s="undo"==t?i.undone:i.done,l=0;l<a.length&&(r=a[l],n?!r.ranges||r.equals(e.sel):r.ranges);l++);if(l!=a.length){for(i.lastOrigin=i.lastSelOrigin=null;r=a.pop(),r.ranges;){if(Qr(r,s),n&&!r.equals(e.sel))return void fi(e,r,{clearRedo:!1});o=r}var c=[];Qr(o,s),s.push({changes:c,generation:i.generation}),i.generation=r.generation||++i.maxGeneration;for(var u=De(e,"beforeChange")||e.cm&&De(e.cm,"beforeChange"),f=function(n){var i=r.changes[n];if(i.origin=t,u&&!bi(e,i,!1))return a.length=0,{};c.push(Ur(e,i));var o=n?Pr(e,i):m(a);Si(e,i,o,ni(e,i)),!n&&e.cm&&e.cm.scrollIntoView({from:i.from,to:Nr(i)});var s=[];Wr(e,function(e,t){t||p(s,e.history)!=-1||(Fi(e.history,i),s.push(e.history)),Si(e,i,null,ni(e,i))})},d=r.changes.length-1;d>=0;--d){var h=f(d);if(h)return h.v}}}}function Ci(e,t){if(0!=t&&(e.first+=t,e.sel=new Fr(g(e.sel.ranges,function(e){return new Or(D(e.anchor.line+t,e.anchor.ch),D(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){dr(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;r<n.viewTo;r++)hr(e.cm,r,"gutter")}}function Si(e,t,n,r){if(e.cm&&!e.cm.curOp)return ur(e.cm,Si)(e,t,n,r);if(t.to.line<e.first)return void Ci(e,t.text.length-1-(t.to.line-t.from.line));if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var i=t.text.length-1-(e.first-t.from.line);Ci(e,i),t={from:D(e.first,0),to:D(t.to.line+i,t.to.ch),text:[m(t.text)],origin:t.origin}}var o=e.lastLine();t.to.line>o&&(t={from:t.from,to:D(o,S(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=T(e,t.from,t.to),n||(n=Pr(e,t)),e.cm?Ti(e.cm,t,r):Hr(e,t,r),pi(e,n,Ta)}}function Ti(e,t,n){var r=e.doc,i=e.display,o=t.from,a=t.to,s=!1,l=o.line;e.options.lineWrapping||(l=L(le(S(r,o.line))),r.iter(l,a.line+1,function(e){if(e==i.maxLine)return s=!0,!0})),r.sel.contains(t.from,t.to)>-1&&Ee(e),Hr(r,t,n,wn(e)),e.options.lineWrapping||(r.iter(l,o.line+t.text.length,function(e){var t=me(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,s=!1)}),s&&(e.curOp.updateMaxLine=!0)),r.frontier=Math.min(r.frontier,o.line),xr(e,400);var c=t.text.length-(a.line-o.line)-1;t.full?dr(e):o.line!=a.line||1!=t.text.length||zr(e.doc,t)?dr(e,o.line,a.line+1,c):hr(e,o.line,"text");var u=De(e,"changes"),f=De(e,"change");if(f||u){var p={from:o,to:a,text:t.text,removed:t.removed,origin:t.origin};f&&Ct(e,"change",e,p),u&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(p)}e.display.selForContextMenu=null}function Ai(e,t,n,r,i){if(r||(r=n),N(r,n)<0){var o=r;r=n,n=o}"string"==typeof t&&(t=e.splitLines(t)),wi(e,{from:n,to:r,text:t,origin:i})}function Mi(e,t,n,r){n<e.line?e.line+=r:t<e.line&&(e.line=t,e.ch=0)}function Li(e,t,n,r){for(var i=0;i<e.length;++i){var o=e[i],a=!0;if(o.ranges){o.copied||(o=e[i]=o.deepCopy(),o.copied=!0);for(var s=0;s<o.ranges.length;s++)Mi(o.ranges[s].anchor,t,n,r),Mi(o.ranges[s].head,t,n,r)}else{for(var l=0;l<o.changes.length;++l){var c=o.changes[l];if(n<c.from.line)c.from=D(c.from.line+r,c.from.ch),c.to=D(c.to.line+r,c.to.ch);else if(t<=c.to.line){a=!1;break}}a||(e.splice(0,i+1),i=0)}}}function Fi(e,t){var n=t.from.line,r=t.to.line,i=t.text.length-(r-n)-1;Li(e.done,n,r,i),Li(e.undone,n,r,i)}function Oi(e,t,n,r){var i=t,o=t;return"number"==typeof t?o=S(e,R(e,t)):i=L(t),null==i?null:(r(o,i)&&e.cm&&hr(e.cm,i,n),o)}function Ei(e){var t=this;this.lines=e,this.parent=null;for(var n=0,r=0;r<e.length;++r)e[r].parent=t,n+=e[r].height;this.height=n}function Di(e){var t=this;this.children=e;for(var n=0,r=0,i=0;i<e.length;++i){var o=e[i];n+=o.chunkSize(),r+=o.height,o.parent=t}this.size=n,this.height=r,this.parent=null}function Ni(e,t,n){var r=this;if(n)for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i]);this.doc=e,this.node=t}function ji(e,t,n){he(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Qn(e,null,n)}function Pi(e,t,n,r){var i=new Ni(e,n,r),o=e.cm;return o&&i.noHScroll&&(o.display.alignWidgets=!0),Oi(e,t,"widget",function(t){var n=t.widgets||(t.widgets=[]);if(null==i.insertAt?n.push(i):n.splice(Math.min(n.length-1,Math.max(0,i.insertAt)),0,i),i.line=t,o&&!pe(e,t)){var r=he(t)<e.scrollTop;M(t,t.height+Rt(i)),r&&Qn(o,null,i.height),o.curOp.forceUpdate=!0}return!0}),i}function Ii(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++as}function Ri(e,t,n,i,o){if(i&&i.shared)return Bi(e,t,n,i,o);if(e.cm&&!e.cm.curOp)return ur(e.cm,Ri)(e,t,n,i,o);var a=new Ii(e,o),s=N(t,n);if(i&&c(i,a,!1),s>0||0==s&&a.clearWhenEmpty!==!1)return a;if(a.replacedWith&&(a.collapsed=!0,a.widgetNode=r("span",[a.replacedWith],"CodeMirror-widget"),a.widgetNode.setAttribute("role","presentation"),i.handleMouseEvents||a.widgetNode.setAttribute("cm-ignore-events","true"),i.insertLeft&&(a.widgetNode.insertLeft=!0)),a.collapsed){if(se(e,t.line,t,n,a)||t.line!=n.line&&se(e,n.line,t,n,a))throw new Error("Inserting collapsed marker partially overlapping an existing one");W()}a.addToHistory&&Xr(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var l,u=t.line,f=e.cm;if(e.iter(u,n.line+1,function(e){f&&a.collapsed&&!f.options.lineWrapping&&le(e)==f.display.maxLine&&(l=!0),a.collapsed&&u!=t.line&&M(e,0),V(e,new $(a,u==t.line?t.ch:null,u==n.line?n.ch:null)),++u}),a.collapsed&&e.iter(t.line,n.line+1,function(t){pe(e,t)&&M(t,0)}),a.clearOnEnter&&Ia(a,"beforeCursorEnter",function(){return a.clear()}),a.readOnly&&(H(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),a.collapsed&&(a.id=++as,a.atomic=!0),f){if(l&&(f.curOp.updateMaxLine=!0),a.collapsed)dr(f,t.line,n.line+1);else if(a.className||a.title||a.startStyle||a.endStyle||a.css)for(var p=t.line;p<=n.line;p++)hr(f,p,"text");a.atomic&&hi(f.doc),Ct(f,"markerAdded",f,a)}return a}function qi(e,t){var n=this;this.markers=e,this.primary=t;for(var r=0;r<e.length;++r)e[r].parent=n}function Bi(e,t,n,r,i){r=c(r),r.shared=!1;var o=[Ri(e,t,n,r,i)],a=o[0],s=r.widgetNode;return Wr(e,function(e){s&&(r.widgetNode=s.cloneNode(!0)),o.push(Ri(e,q(e,t),q(e,n),r,i));for(var l=0;l<e.linked.length;++l)if(e.linked[l].isParent)return;a=m(o)}),new qi(o,a)}function zi(e){return e.findMarks(D(e.first,0),e.clipPos(D(e.lastLine())),function(e){return e.parent})}function Hi(e,t){for(var n=0;n<t.length;n++){var r=t[n],i=r.find(),o=e.clipPos(i.from),a=e.clipPos(i.to);if(N(o,a)){var s=Ri(e,o,a,r.primary,r.primary.type);r.markers.push(s),s.parent=r}}}function Wi(e){for(var t=function(t){var n=e[t],r=[n.primary.doc];Wr(n.primary.doc,function(e){return r.push(e)});for(var i=0;i<n.markers.length;i++){var o=n.markers[i];p(r,o.doc)==-1&&(o.parent=null,n.markers.splice(i--,1))}},n=0;n<e.length;n++)t(n)}function $i(e){var t=this;if(Vi(t),!Oe(t,e)&&!qt(t.display,e)){je(e),na&&(cs=+new Date);var n=_n(t,e,!0),r=e.dataTransfer.files;if(n&&!t.isReadOnly())if(r&&r.length&&window.FileReader&&window.File)for(var i=r.length,o=Array(i),a=0,s=function(e,r){if(!t.options.allowDropFileTypes||p(t.options.allowDropFileTypes,e.type)!=-1){var s=new FileReader;s.onload=ur(t,function(){var e=s.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(e)&&(e=""),o[r]=e,++a==i){n=q(t.doc,n);var l={from:n,to:n,text:t.doc.splitLines(o.join(t.doc.lineSeparator())),origin:"paste"};wi(t.doc,l),ui(t.doc,Dr(n,Nr(l)))}}),s.readAsText(e)}},l=0;l<i;++l)s(r[l],l);else{if(t.state.draggingText&&t.doc.sel.contains(n)>-1)return t.state.draggingText(e),void setTimeout(function(){return t.display.input.focus()},20);try{var c=e.dataTransfer.getData("Text");if(c){var u;if(t.state.draggingText&&!t.state.draggingText.copy&&(u=t.listSelections()),pi(t.doc,Dr(n,n)),u)for(var f=0;f<u.length;++f)Ai(t.doc,"",u[f].anchor,u[f].head,"drag");t.replaceSelection(c,"around","paste"),t.display.input.focus()}}catch(e){}}}}function Ki(e,t){if(na&&(!e.state.draggingText||+new Date-cs<100))return void Re(t);if(!Oe(e,t)&&!qt(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!la)){var n=r("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",sa&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),sa&&n.parentNode.removeChild(n)}}function Ui(e,t){var i=_n(e,t);if(i){var o=document.createDocumentFragment();An(e,i,o),e.display.dragCursor||(e.display.dragCursor=r("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),n(e.display.dragCursor,o)}}function Vi(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Gi(e){if(document.body.getElementsByClassName)for(var t=document.body.getElementsByClassName("CodeMirror"),n=0;n<t.length;n++){var r=t[n].CodeMirror;r&&e(r)}}function Xi(){us||(Yi(),us=!0)}function Yi(){var e;Ia(window,"resize",function(){null==e&&(e=setTimeout(function(){e=null,Gi(Ji)},100))}),Ia(window,"blur",function(){return Gi(Dn)})}function Ji(e){var t=e.display;t.lastWrapHeight==t.wrapper.clientHeight&&t.lastWrapWidth==t.wrapper.clientWidth||(t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize())}function Qi(e){var t=e.split(/-(?!$)/);e=t[t.length-1];for(var n,r,i,o,a=0;a<t.length-1;a++){var s=t[a];if(/^(cmd|meta|m)$/i.test(s))o=!0;else if(/^a(lt)?$/i.test(s))n=!0;else if(/^(c|ctrl|control)$/i.test(s))r=!0;else{if(!/^s(hift)?$/i.test(s))throw new Error("Unrecognized modifier name: "+s);i=!0}}return n&&(e="Alt-"+e),r&&(e="Ctrl-"+e),o&&(e="Cmd-"+e),i&&(e="Shift-"+e),e}function Zi(e){var t={};for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];if(/^(name|fallthrough|(de|at)tach)$/.test(n))continue;if("..."==r){delete e[n];continue}for(var i=g(n.split(" "),Qi),o=0;o<i.length;o++){var a=void 0,s=void 0;o==i.length-1?(s=i.join(" "),a=r):(s=i.slice(0,o+1).join(" "),a="...");var l=t[s];if(l){if(l!=a)throw new Error("Inconsistent bindings for "+s)}else t[s]=a}delete e[n]}for(var c in t)e[c]=t[c];return e}function eo(e,t,n,r){t=ro(t);var i=t.call?t.call(e,r):t[e];if(i===!1)return"nothing";if("..."===i)return"multi";if(null!=i&&n(i))return"handled";if(t.fallthrough){if("[object Array]"!=Object.prototype.toString.call(t.fallthrough))return eo(e,t.fallthrough,n,r);for(var o=0;o<t.fallthrough.length;o++){var a=eo(e,t.fallthrough[o],n,r);if(a)return a}}}function to(e){var t="string"==typeof e?e:fs[e.keyCode];return"Ctrl"==t||"Alt"==t||"Shift"==t||"Mod"==t}function no(e,t){if(sa&&34==e.keyCode&&e.char)return!1;var n=fs[e.keyCode],r=n;return null!=r&&!e.altGraphKey&&(e.altKey&&"Alt"!=n&&(r="Alt-"+r),(ya?e.metaKey:e.ctrlKey)&&"Ctrl"!=n&&(r="Ctrl-"+r),(ya?e.ctrlKey:e.metaKey)&&"Cmd"!=n&&(r="Cmd-"+r),!t&&e.shiftKey&&"Shift"!=n&&(r="Shift-"+r),r)}function ro(e){return"string"==typeof e?ms[e]:e}function io(e,t){for(var n=e.doc.sel.ranges,r=[],i=0;i<n.length;i++){for(var o=t(n[i]);r.length&&N(o.from,m(r).to)<=0;){var a=r.pop();if(N(a.from,o.from)<0){o.from=a.from;break}}r.push(o)}cr(e,function(){for(var t=r.length-1;t>=0;t--)Ai(e.doc,"",r[t].from,r[t].to,"+delete");Zn(e)})}function oo(e,t){var n=S(e.doc,t),r=le(n);r!=n&&(t=L(r));var i=Ae(r),o=i?i[0].level%2?we(r):be(r):0;return D(t,o)}function ao(e,t){for(var n,r=S(e.doc,t);n=ae(r);)r=n.find(1,!0).line,t=null;var i=Ae(r),o=i?i[0].level%2?be(r):we(r):r.text.length;return D(null==t?L(r):t,o)}function so(e,t){var n=oo(e,t.line),r=S(e.doc,n.line),i=Ae(r);if(!i||0==i[0].level){var o=Math.max(0,r.text.search(/\S/)),a=t.line==n.line&&t.ch<=o&&t.ch;return D(n.line,a?0:o)}return n}function lo(e,t,n){if("string"==typeof t&&(t=ys[t],!t))return!1;e.display.input.ensurePolled();var r=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n&&(e.display.shift=!1),i=t(e)!=Sa}finally{e.display.shift=r,e.state.suppressEdits=!1}return i}function co(e,t,n){for(var r=0;r<e.state.keyMaps.length;r++){var i=eo(t,e.state.keyMaps[r],n,e);if(i)return i}return e.options.extraKeys&&eo(t,e.options.extraKeys,n,e)||eo(t,e.options.keyMap,n,e)}function uo(e,t,n,r){var i=e.state.keySeq;if(i){if(to(t))return"handled";xs.set(50,function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())}),t=i+" "+t}var o=co(e,t,r);return"multi"==o&&(e.state.keySeq=t),"handled"==o&&Ct(e,"keyHandled",e,t,n),"handled"!=o&&"multi"!=o||(je(n),Ln(e)),i&&!o&&/\'$/.test(t)?(je(n),!0):!!o}function fo(e,t){var n=no(t,!0);return!!n&&(t.shiftKey&&!e.state.keySeq?uo(e,"Shift-"+n,t,function(t){return lo(e,t,!0)})||uo(e,n,t,function(t){if("string"==typeof t?/^go[A-Z]/.test(t):t.motion)return lo(e,t)}):uo(e,n,t,function(t){return lo(e,t)}))}function po(e,t,n){return uo(e,"'"+n+"'",t,function(t){return lo(e,t,!0)})}function ho(e){var t=this;if(t.curOp.focus=o(),!Oe(t,e)){na&&ra<11&&27==e.keyCode&&(e.returnValue=!1);var n=e.keyCode;t.display.shift=16==n||e.shiftKey;var r=fo(t,e);sa&&(bs=r?n:null,!r&&88==n&&!za&&(da?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),18!=n||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||mo(t)}}function mo(e){function t(e){18!=e.keyCode&&e.altKey||(ba(n,"CodeMirror-crosshair"),Le(document,"keyup",t),Le(document,"mouseover",t))}var n=e.display.lineDiv;a(n,"CodeMirror-crosshair"),Ia(document,"keyup",t),Ia(document,"mouseover",t)}function go(e){16==e.keyCode&&(this.doc.sel.shift=!1),Oe(this,e)}function vo(e){var t=this;if(!(qt(t.display,e)||Oe(t,e)||e.ctrlKey&&!e.altKey||da&&e.metaKey)){var n=e.keyCode,r=e.charCode;if(sa&&n==bs)return bs=null,void je(e);if(!sa||e.which&&!(e.which<10)||!fo(t,e)){var i=String.fromCharCode(null==r?n:r);"\b"!=i&&(po(t,e,i)||t.display.input.onKeyPress(e))}}}function yo(e){var t=this,n=t.display;if(!(Oe(t,e)||n.activeTouch&&n.input.supportsTouch())){if(n.input.ensurePolled(),n.shift=e.shiftKey,qt(n,e))return void(ia||(n.scroller.draggable=!1,setTimeout(function(){return n.scroller.draggable=!0},100)));if(!_o(t,e)){var r=_n(t,e);switch(window.focus(),Be(e)){case 1:t.state.selectingText?t.state.selectingText(e):r?xo(t,e,r):qe(e)==n.scroller&&je(e);break;case 2:ia&&(t.state.lastMiddleDown=+new Date),r&&oi(t.doc,r),setTimeout(function(){return n.input.focus()},20),je(e);break;case 3:xa?Co(t,e):On(t)}}}}function xo(e,t,n){na?setTimeout(l(Fn,e),0):e.curOp.focus=o();var r,i=+new Date;vs&&vs.time>i-400&&0==N(vs.pos,n)?r="triple":gs&&gs.time>i-400&&0==N(gs.pos,n)?(r="double",vs={time:i,pos:n}):(r="single",gs={time:i,pos:n});var a,s=e.doc.sel,c=da?t.metaKey:t.ctrlKey;e.options.dragDrop&&Ra&&!e.isReadOnly()&&"single"==r&&(a=s.contains(n))>-1&&(N((a=s.ranges[a]).from(),n)<0||n.xRel>0)&&(N(a.to(),n)>0||n.xRel<0)?bo(e,t,n,c):wo(e,t,n,r,c)}function bo(e,t,n,r){var i=e.display,o=+new Date,a=ur(e,function(s){ia&&(i.scroller.draggable=!1),e.state.draggingText=!1,Le(document,"mouseup",a),Le(i.scroller,"drop",a),Math.abs(t.clientX-s.clientX)+Math.abs(t.clientY-s.clientY)<10&&(je(s),!r&&+new Date-200<o&&oi(e.doc,n),ia||na&&9==ra?setTimeout(function(){document.body.focus(),i.input.focus()},20):i.input.focus())});ia&&(i.scroller.draggable=!0),e.state.draggingText=a,a.copy=da?t.altKey:t.ctrlKey,i.scroller.dragDrop&&i.scroller.dragDrop(),Ia(document,"mouseup",a),Ia(i.scroller,"drop",a)}function wo(e,t,n,r,i){function a(t){if(0!=N(x,t))if(x=t,"rect"==r){for(var i=[],o=e.options.tabSize,a=u(S(f,n.line).text,n.ch,o),s=u(S(f,t.line).text,t.ch,o),l=Math.min(a,s),c=Math.max(a,s),g=Math.min(n.line,t.line),v=Math.min(e.lastLine(),Math.max(n.line,t.line));g<=v;g++){var y=S(f,g).text,b=d(y,l,o);l==c?i.push(new Or(D(g,b),D(g,b))):y.length>b&&i.push(new Or(D(g,b),D(g,d(y,c,o))))}i.length||i.push(new Or(n,n)),fi(f,Er(m.ranges.slice(0,h).concat(i),h),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var w=p,k=w.anchor,_=t;if("single"!=r){var C;C="double"==r?e.findWordAt(t):new Or(D(t.line,0),q(f,D(t.line+1,0))),N(C.anchor,k)>0?(_=C.head,k=I(w.from(),C.anchor)):(_=C.anchor,k=P(w.to(),C.head))}var T=m.ranges.slice(0);T[h]=new Or(q(f,k),_),fi(f,Er(T,h),Aa)}}function s(t){var n=++w,i=_n(e,t,!0,"rect"==r);if(i)if(0!=N(i,x)){e.curOp.focus=o(),a(i);var l=Rn(c,f);(i.line>=l.to||i.line<l.from)&&setTimeout(ur(e,function(){w==n&&s(t)}),150)}else{var u=t.clientY<b.top?-20:t.clientY>b.bottom?20:0;u&&setTimeout(ur(e,function(){w==n&&(c.scroller.scrollTop+=u,s(t))}),50)}}function l(t){e.state.selectingText=!1,w=1/0,je(t),c.input.focus(),Le(document,"mousemove",k),Le(document,"mouseup",_),f.history.lastSelOrigin=null}var c=e.display,f=e.doc;je(t);var p,h,m=f.sel,g=m.ranges;if(i&&!t.shiftKey?(h=f.sel.contains(n),p=h>-1?g[h]:new Or(n,n)):(p=f.sel.primary(),h=f.sel.primIndex),ha?t.shiftKey&&t.metaKey:t.altKey)r="rect",i||(p=new Or(n,n)),n=_n(e,t,!0,!0),h=-1;else if("double"==r){var v=e.findWordAt(n);p=e.display.shift||f.extend?ii(f,p,v.anchor,v.head):v}else if("triple"==r){var y=new Or(D(n.line,0),q(f,D(n.line+1,0)));p=e.display.shift||f.extend?ii(f,p,y.anchor,y.head):y}else p=ii(f,p,n);i?h==-1?(h=g.length,fi(f,Er(g.concat([p]),h),{scroll:!1,origin:"*mouse"})):g.length>1&&g[h].empty()&&"single"==r&&!t.shiftKey?(fi(f,Er(g.slice(0,h).concat(g.slice(h+1)),0),{scroll:!1,origin:"*mouse"}),m=f.sel):si(f,h,p,Aa):(h=0,fi(f,new Fr([p],0),Aa),m=f.sel);var x=n,b=c.wrapper.getBoundingClientRect(),w=0,k=ur(e,function(e){Be(e)?s(e):l(e)}),_=ur(e,l);e.state.selectingText=_,Ia(document,"mousemove",k),Ia(document,"mouseup",_)}function ko(e,t,n,r){var i,o;try{i=t.clientX,o=t.clientY}catch(e){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&je(t);var a=e.display,s=a.lineDiv.getBoundingClientRect();if(o>s.bottom||!De(e,n))return Ie(t);o-=s.top-a.viewOffset;for(var l=0;l<e.options.gutters.length;++l){var c=a.gutters.childNodes[l];if(c&&c.getBoundingClientRect().right>=i){var u=F(e.doc,o),f=e.options.gutters[l];return Fe(e,n,e,u,f,t),Ie(t)}}}function _o(e,t){return ko(e,t,"gutterClick",!0)}function Co(e,t){qt(e.display,t)||So(e,t)||Oe(e,t,"contextmenu")||e.display.input.onContextMenu(t)}function So(e,t){return!!De(e,"gutterContextMenu")&&ko(e,t,"gutterContextMenu",!1)}function To(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),an(e)}function Ao(e){function t(t,r,i,o){e.defaults[t]=r,i&&(n[t]=o?function(e,t,n){n!=ws&&i(e,t,n)}:i)}var n=e.optionHandlers;e.defineOption=t,e.Init=ws,t("value","",function(e,t){return e.setValue(t)},!0),t("mode",null,function(e,t){e.doc.modeOption=t,qr(e)},!0),t("indentUnit",2,qr,!0),t("indentWithTabs",!1),t("smartIndent",!0),t("tabSize",4,function(e){Br(e),an(e),dr(e)},!0),t("lineSeparator",null,function(e,t){if(e.doc.lineSep=t,t){var n=[],r=e.doc.first;e.doc.iter(function(e){for(var i=0;;){var o=e.text.indexOf(t,i);if(o==-1)break;i=o+t.length,n.push(D(r,o))}r++});for(var i=n.length-1;i>=0;i--)Ai(e.doc,t,n[i],D(n[i].line,n[i].ch+t.length))}}),t("specialChars",/[\u0000-\u001f\u007f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff]/g,function(e,t,n){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),n!=ws&&e.refresh()}),t("specialCharPlaceholder",dt,function(e){return e.refresh()},!0),t("electricChars",!0),t("inputStyle",pa?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),t("spellcheck",!1,function(e,t){return e.getInputField().spellcheck=t},!0),t("rtlMoveVisually",!ma),t("wholeLineUpdateBefore",!0),t("theme","default",function(e){To(e),Mo(e)},!0),t("keyMap","default",function(e,t,n){var r=ro(t),i=n!=ws&&ro(n);i&&i.detach&&i.detach(e,r),r.attach&&r.attach(e,i||null)}),t("extraKeys",null),t("lineWrapping",!1,Fo,!0),t("gutters",[],function(e){Lr(e.options),Mo(e)},!0),t("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?bn(e.display)+"px":"0",e.refresh()},!0),t("coverGutterNextToScrollbar",!1,function(e){return Kn(e)},!0),t("scrollbarStyle","native",function(e){Vn(e),Kn(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),t("lineNumbers",!1,function(e){Lr(e.options),Mo(e)},!0),t("firstLineNumber",1,Mo,!0),t("lineNumberFormatter",function(e){return e},Mo,!0),t("showCursorWhenSelecting",!1,Sn,!0),t("resetSelectionOnContextMenu",!0),t("lineWiseCopyCut",!0),t("readOnly",!1,function(e,t){"nocursor"==t?(Dn(e),e.display.input.blur(),e.display.disabled=!0):e.display.disabled=!1,e.display.input.readOnlyChanged(t)}),t("disableInput",!1,function(e,t){t||e.display.input.reset()},!0),t("dragDrop",!0,Lo),t("allowDropFileTypes",null),t("cursorBlinkRate",530),t("cursorScrollMargin",0),t("cursorHeight",1,Sn,!0),t("singleCursorHeightPerLine",!0,Sn,!0),t("workTime",100),t("workDelay",100),t("flattenSpans",!0,Br,!0),t("addModeClass",!1,Br,!0),t("pollInterval",100),t("undoDepth",200,function(e,t){return e.doc.history.undoDepth=t}),t("historyEventDelay",1250),t("viewportMargin",10,function(e){return e.refresh()},!0),t("maxHighlightLength",1e4,Br,!0),t("moveInputWithCursor",!0,function(e,t){t||e.display.input.resetPosition()}),t("tabindex",null,function(e,t){return e.display.input.getField().tabIndex=t||""}),t("autofocus",null)}function Mo(e){Mr(e),dr(e),Nn(e)}function Lo(e,t,n){var r=n&&n!=ws;if(!t!=!r){var i=e.display.dragFunctions,o=t?Ia:Le;o(e.display.scroller,"dragstart",i.start),o(e.display.scroller,"dragenter",i.enter),o(e.display.scroller,"dragover",i.over),o(e.display.scroller,"dragleave",i.leave),o(e.display.scroller,"drop",i.drop)}}function Fo(e){e.options.lineWrapping?(a(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(ba(e.display.wrapper,"CodeMirror-wrap"),ge(e)),kn(e),dr(e),an(e),setTimeout(function(){return Kn(e)},100)}function Oo(e,t){var n=this;if(!(this instanceof Oo))return new Oo(e,t);this.options=t=t?c(t):{},c(ks,t,!1),Lr(t);var r=t.value;"string"==typeof r&&(r=new ls(r,t.mode,null,t.lineSeparator)),this.doc=r;var i=new Oo.inputStyles[t.inputStyle](this),o=this.display=new C(e,r,i);o.wrapper.CodeMirror=this,
0 ignored issues
show
Coding Style Best Practice introduced by
By convention, constructors like qi should be capitalized.
Loading history...
Unused Code introduced by
The assignment to variable a seems to be never used. Consider removing it.
Loading history...
Comprehensibility introduced by
There is no default case in this switch, so nothing gets returned when all cases fail. You might want to consider adding a default or return undefined explicitly.
Loading history...
Complexity Best Practice introduced by
There is no return statement if n && !t.isReadOnly() is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Complexity Best Practice introduced by
There is no return statement if !sa || e.which && !(e.which < 10) || !fo(t, e) is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Comprehensibility introduced by
Usage of the sequence operator is discouraged, since it may lead to obfuscated code.

The sequence or comma operator allows the inclusion of multiple expressions where only is permitted. The result of the sequence is the value of the last expression.

This operator is most often used in for statements.

Used in another places it can make code hard to read, especially when people do not realize it even exists as a seperate operator.

This check looks for usage of the sequence operator in locations where it is not necessary and could be replaced by a series of expressions or statements.

var a,b,c;

a = 1, b = 1,  c= 3;

could just as well be written as:

var a,b,c;

a = 1;
b = 1;
c = 3;

To learn more about the sequence operator, please refer to the MDN.

Loading history...
Complexity Best Practice introduced by
There is no return statement if !Oe(e, t) && !qt(e.displ...fer.setDragImage && !la is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Complexity Best Practice introduced by
There is no return statement if !e.cm || !e.cm.state.suppressEdits || n is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Complexity Best Practice introduced by
There is no return statement if !(qt(t.display, e) || Oe...Key || da && e.metaKey) is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Complexity Best Practice introduced by
There is no return statement if !(t.from.line > e.lastLine()) is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Unused Code introduced by
The assignment to variable u seems to be never used. Consider removing it.
Loading history...
Coding Style Comprehensibility Best Practice introduced by
Empty catch clauses should be used with caution; consider adding a comment why this is needed.
Loading history...
Complexity introduced by
A for in loop automatically includes the property of any prototype object, consider checking the key using hasOwnProperty.

When iterating over the keys of an object, this includes not only the keys of the object, but also keys contained in the prototype of that object. It is generally a best practice to check for these keys specifically:

var someObject;
for (var key in someObject) {
    if ( ! someObject.hasOwnProperty(key)) {
        continue; // Skip keys from the prototype.
    }

    doSomethingWith(key);
}
Loading history...
Coding Style Best Practice introduced by
By convention, constructors like lt should be capitalized.
Loading history...
Complexity Best Practice introduced by
There is no return statement if l != a.length is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Unused Code introduced by
The assignment to variable i seems to be never used. Consider removing it.
Loading history...
Unused Code introduced by
The assignment to variable s seems to be never used. Consider removing it.
Loading history...
Complexity Best Practice introduced by
There is no return statement if !(Oe(t, e) || n.activeTo....input.supportsTouch()) is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Coding Style introduced by
As per coding-style, switch statements should have a default case.
Loading history...
Comprehensibility Best Practice introduced by
The name e is already used for a variable on line 3. Please consider using another name to prevent misunderstandings.
Loading history...
Best Practice introduced by
There is no return statement in this branch, but you do return something in other branches. Did you maybe miss it? If you do not want to return anything, consider adding return undefined; explicitly.
Loading history...
Coding Style Best Practice introduced by
By convention, constructors like ls should be capitalized.
Loading history...
Complexity Best Practice introduced by
There is no return statement if Vi(t), !Oe(t, e) && !qt(t.display, e) is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Complexity Best Practice introduced by
There is no return statement if "string" == typeof t ? ...[A-Z].test(t): t.motion is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Coding Style Best Practice introduced by
Curly braces around statements make for more readable code and help prevent bugs when you add further statements.

Consider adding curly braces around all statements when they are executed conditionally. This is optional if there is only one statement, but leaving them out can lead to unexpected behaviour if another statement is added later.

Consider:

if (a > 0)
    b = 42;

If you or someone else later decides to put another statement in, only the first statement will be executed.

if (a > 0)
    console.log("a > 0");
    b = 42;

In this case the statement b = 42 will always be executed, while the logging statement will be executed conditionally.

if (a > 0) {
    console.log("a > 0");
    b = 42;
}

ensures that the proper code will be executed conditionally no matter how many statements are added or removed.

Loading history...
Complexity Best Practice introduced by
There is no return statement if e == i.maxLine is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Complexity Best Practice introduced by
There is no return statement if c is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Bug introduced by
The variable u does not seem to be initialized in case t.state.draggingText && ... pi(t.doc, Dr(n, n)), u on line 3 is true. Are you sure this can never be the case?
Loading history...
Complexity Best Practice introduced by
There is no return statement if !(De(e, "beforeChange") ...")) || t = bi(e, t, !0) is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Bug introduced by
The call to di seems to have too many arguments starting with Ta.
Loading history...
Coding Style introduced by
Consider using undefined instead of void(0). It is equivalent and more straightforward to read.
Loading history...
Bug introduced by
The variable FileReader seems to be never declared. If this is a global, consider adding a /** global: FileReader */ comment.

This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.

To learn more about declaring variables in Javascript, see the MDN.

Loading history...
introduced by
The for loop does not have a body. Maybe you have misplaced a semicolon. If you do wish to have a loop without a body, use an empty body {}.
Loading history...
Complexity Best Practice introduced by
There is no return statement if t.fallthrough is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Complexity Best Practice introduced by
There is no return statement if !_o(t, e) is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
4
Mr(this),To(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Vn(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:!1,cutIncoming:!1,selectingText:!1,draggingText:!1,highlight:new f,keySeq:null,specialChars:null},t.autofocus&&!pa&&o.input.focus(),na&&ra<11&&setTimeout(function(){return n.display.input.reset(!0)},20),Eo(this),Xi(),tr(this),this.curOp.forceUpdate=!0,$r(this,r),t.autofocus&&!pa||this.hasFocus()?setTimeout(l(En,this),20):Dn(this);for(var a in _s)_s.hasOwnProperty(a)&&_s[a](n,t[a],ws);jn(this),t.finishInit&&t.finishInit(this);for(var s=0;s<Cs.length;++s)Cs[s](n);nr(this),ia&&t.lineWrapping&&"optimizelegibility"==getComputedStyle(o.lineDiv).textRendering&&(o.lineDiv.style.textRendering="auto")}function Eo(e){function t(){i.activeTouch&&(o=setTimeout(function(){return i.activeTouch=null},1e3),a=i.activeTouch,a.end=+new Date)}function n(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}function r(e,t){if(null==t.left)return!0;var n=t.left-e.left,r=t.top-e.top;return n*n+r*r>400}var i=e.display;Ia(i.scroller,"mousedown",ur(e,yo)),na&&ra<11?Ia(i.scroller,"dblclick",ur(e,function(t){if(!Oe(e,t)){var n=_n(e,t);if(n&&!_o(e,t)&&!qt(e.display,t)){je(t);var r=e.findWordAt(n);oi(e.doc,r.anchor,r.head)}}})):Ia(i.scroller,"dblclick",function(t){return Oe(e,t)||je(t)}),xa||Ia(i.scroller,"contextmenu",function(t){return Co(e,t)});var o,a={end:0};Ia(i.scroller,"touchstart",function(t){if(!Oe(e,t)&&!n(t)){i.input.ensurePolled(),clearTimeout(o);var r=+new Date;i.activeTouch={start:r,moved:!1,prev:r-a.end<=300?a:null},1==t.touches.length&&(i.activeTouch.left=t.touches[0].pageX,i.activeTouch.top=t.touches[0].pageY)}}),Ia(i.scroller,"touchmove",function(){i.activeTouch&&(i.activeTouch.moved=!0)}),Ia(i.scroller,"touchend",function(n){var o=i.activeTouch;if(o&&!qt(i,n)&&null!=o.left&&!o.moved&&new Date-o.start<300){var a,s=e.coordsChar(i.activeTouch,"page");a=!o.prev||r(o,o.prev)?new Or(s,s):!o.prev.prev||r(o,o.prev.prev)?e.findWordAt(s):new Or(D(s.line,0),q(e.doc,D(s.line+1,0))),e.setSelection(a.anchor,a.head),e.focus(),je(n)}t()}),Ia(i.scroller,"touchcancel",t),Ia(i.scroller,"scroll",function(){i.scroller.clientHeight&&(qn(e,i.scroller.scrollTop),Bn(e,i.scroller.scrollLeft,!0),Fe(e,"scroll",e))}),Ia(i.scroller,"mousewheel",function(t){return Wn(e,t)}),Ia(i.scroller,"DOMMouseScroll",function(t){return Wn(e,t)}),Ia(i.wrapper,"scroll",function(){return i.wrapper.scrollTop=i.wrapper.scrollLeft=0}),i.dragFunctions={enter:function(t){Oe(e,t)||Re(t)},over:function(t){Oe(e,t)||(Ui(e,t),Re(t))},start:function(t){return Ki(e,t)},drop:ur(e,$i),leave:function(t){Oe(e,t)||Vi(e)}};var s=i.input.getField();Ia(s,"keyup",function(t){return go.call(e,t)}),Ia(s,"keydown",ur(e,ho)),Ia(s,"keypress",ur(e,vo)),Ia(s,"focus",function(t){return En(e,t)}),Ia(s,"blur",function(t){return Dn(e,t)})}function Do(e,t,n,r){var i,o=e.doc;null==n&&(n="add"),"smart"==n&&(o.mode.indent?i=et(e,t):n="prev");var a=e.options.tabSize,s=S(o,t),l=u(s.text,null,a);s.stateAfter&&(s.stateAfter=null);var c,f=s.text.match(/^\s*/)[0];if(r||/\S/.test(s.text)){if("smart"==n&&(c=o.mode.indent(i,s.text.slice(f.length),s.text),c==Sa||c>150)){if(!r)return;n="prev"}}else c=0,n="not";"prev"==n?c=t>o.first?u(S(o,t-1).text,null,a):0:"add"==n?c=l+e.options.indentUnit:"subtract"==n?c=l-e.options.indentUnit:"number"==typeof n&&(c=l+n),c=Math.max(0,c);var p="",d=0;if(e.options.indentWithTabs)for(var m=Math.floor(c/a);m;--m)d+=a,p+="\t";if(d<c&&(p+=h(c-d)),p!=f)return Ai(o,p,D(t,0),D(t,f.length),"+input"),s.stateAfter=null,!0;for(var g=0;g<o.sel.ranges.length;g++){var v=o.sel.ranges[g];if(v.head.line==t&&v.head.ch<f.length){var y=D(t,f.length);si(o,g,new Or(y,y));break}}}function No(e){Ss=e}function jo(e,t,n,r,i){var o=e.doc;e.display.shift=!1,r||(r=o.sel);var a=e.state.pasteIncoming||"paste"==i,s=qa(t),l=null;if(a&&r.ranges.length>1)if(Ss&&Ss.text.join("\n")==t){if(r.ranges.length%Ss.text.length==0){l=[];for(var c=0;c<Ss.text.length;c++)l.push(o.splitLines(Ss.text[c]))}}else s.length==r.ranges.length&&(l=g(s,function(e){return[e]}));for(var u,f=r.ranges.length-1;f>=0;f--){var p=r.ranges[f],d=p.from(),h=p.to();p.empty()&&(n&&n>0?d=D(d.line,d.ch-n):e.state.overwrite&&!a?h=D(h.line,Math.min(S(o,h.line).text.length,h.ch+m(s).length)):Ss&&Ss.lineWise&&Ss.text.join("\n")==t&&(d=h=D(d.line,0))),u=e.curOp.updateInput;var v={from:d,to:h,text:l?l[f%l.length]:s,origin:i||(a?"paste":e.state.cutIncoming?"cut":"+input")};wi(e.doc,v),Ct(e,"inputRead",e,v)}t&&!a&&Io(e,t),Zn(e),e.curOp.updateInput=u,e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=!1}function Po(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||cr(t,function(){return jo(t,n,0,null,"paste")}),!0}function Io(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var o=e.getModeAt(i.head),a=!1;if(o.electricChars){for(var s=0;s<o.electricChars.length;s++)if(t.indexOf(o.electricChars.charAt(s))>-1){a=Do(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(S(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=Do(e,i.head.line,"smart"));a&&Ct(e,"electricInput",e,i.head.line)}}}function Ro(e){for(var t=[],n=[],r=0;r<e.doc.sel.ranges.length;r++){var i=e.doc.sel.ranges[r].head.line,o={anchor:D(i,0),head:D(i+1,0)};n.push(o),t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:n}}function qo(e,t){e.setAttribute("autocorrect","off"),e.setAttribute("autocapitalize","off"),e.setAttribute("spellcheck",!!t)}function Bo(){var e=r("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=r("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return ia?e.style.width="1000px":e.setAttribute("wrap","off"),fa&&(e.style.border="1px solid black"),qo(e),t}function zo(e){var t=e.optionHandlers,n=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,n){var r=this.options,i=r[e];r[e]==n&&"mode"!=e||(r[e]=n,t.hasOwnProperty(e)&&ur(this,t[e])(this,n,i),Fe(this,"optionChange",this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](ro(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;n<t.length;++n)if(t[n]==e||t[n].name==e)return t.splice(n,1),!0},addOverlay:fr(function(t,n){var r=t.token?t:e.getMode(this.options,t);if(r.startState)throw new Error("Overlays may not be stateful.");v(this.state.overlays,{mode:r,modeSpec:t,opaque:n&&n.opaque,priority:n&&n.priority||0},function(e){return e.priority}),this.state.modeGen++,dr(this)}),removeOverlay:fr(function(e){for(var t=this,n=this.state.overlays,r=0;r<n.length;++r){var i=n[r].modeSpec;if(i==e||"string"==typeof e&&i.name==e)return n.splice(r,1),t.state.modeGen++,void dr(t)}}),indentLine:fr(function(e,t,n){"string"!=typeof t&&"number"!=typeof t&&(t=null==t?this.options.smartIndent?"smart":"prev":t?"add":"subtract"),O(this.doc,e)&&Do(this,e,t,n)}),indentSelection:fr(function(e){for(var t=this,n=this.doc.sel.ranges,r=-1,i=0;i<n.length;i++){var o=n[i];if(o.empty())o.head.line>r&&(Do(t,o.head.line,e,!0),r=o.head.line,i==t.doc.sel.primIndex&&Zn(t));else{var a=o.from(),s=o.to(),l=Math.max(r,a.line);r=Math.min(t.lastLine(),s.line-(s.ch?0:1))+1;for(var c=l;c<r;++c)Do(t,c,e);var u=t.doc.sel.ranges;0==a.ch&&n.length==u.length&&u[i].from().ch>0&&si(t.doc,i,new Or(a,u[i].to()),Ta)}}}),getTokenAt:function(e,t){return it(this,e,t)},getLineTokens:function(e,t){return it(this,D(e),t,!0)},getTokenTypeAt:function(e){e=q(this.doc,e);var t,n=Ze(this,S(this.doc,e.line)),r=0,i=(n.length-1)/2,o=e.ch;if(0==o)t=n[2];else for(;;){var a=r+i>>1;if((a?n[2*a-1]:0)>=o)i=a;else{if(!(n[2*a+1]<o)){t=n[2*a+2];break}r=a+1}}var s=t?t.indexOf("overlay "):-1;return s<0?t:0==s?null:t.slice(0,s-1)},getModeAt:function(t){var n=this.doc.mode;return n.innerMode?e.innerMode(n,this.getTokenAt(t).state).mode:n},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var r=this,i=[];if(!n.hasOwnProperty(t))return i;var o=n[t],a=this.getModeAt(e);if("string"==typeof a[t])o[a[t]]&&i.push(o[a[t]]);else if(a[t])for(var s=0;s<a[t].length;s++){var l=o[a[t][s]];l&&i.push(l)}else a.helperType&&o[a.helperType]?i.push(o[a.helperType]):o[a.name]&&i.push(o[a.name]);for(var c=0;c<o._global.length;c++){var u=o._global[c];u.pred(a,r)&&p(i,u.val)==-1&&i.push(u.val)}return i},getStateAfter:function(e,t){var n=this.doc;return e=R(n,null==e?n.first+n.size-1:e),et(this,e+1,t)},cursorCoords:function(e,t){var n,r=this.doc.sel.primary();return n=null==e?r.head:"object"==typeof e?q(this.doc,e):e?r.from():r.to(),pn(this,n,t||"page")},charCoords:function(e,t){return fn(this,q(this.doc,e),t||"page")},coordsChar:function(e,t){return e=un(this,e,t||"page"),mn(this,e.left,e.top)},lineAtHeight:function(e,t){return e=un(this,{top:e,left:0},t||"page").top,F(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t,n){var r,i=!1;if("number"==typeof e){var o=this.doc.first+this.doc.size-1;e<this.doc.first?e=this.doc.first:e>o&&(e=o,i=!0),r=S(this.doc,e)}else r=e;return cn(this,r,{top:0,left:0},t||"page",n).top+(i?this.doc.height-he(r):0)},defaultTextHeight:function(){return vn(this.display)},defaultCharWidth:function(){return yn(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,i){var o=this.display;e=pn(this,q(this.doc,e));var a=e.bottom,s=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),o.sizer.appendChild(t),"over"==r)a=e.top;else if("above"==r||"near"==r){var l=Math.max(o.wrapper.clientHeight,this.doc.height),c=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>l)&&e.top>t.offsetHeight?a=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=l&&(a=e.bottom),s+t.offsetWidth>c&&(s=c-t.offsetWidth)}t.style.top=a+"px",t.style.left=t.style.right="","right"==i?(s=o.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?s=0:"middle"==i&&(s=(o.sizer.clientWidth-t.offsetWidth)/2),t.style.left=s+"px"),n&&Yn(this,s,a,s+t.offsetWidth,a+t.offsetHeight)},triggerOnKeyDown:fr(ho),triggerOnKeyPress:fr(vo),triggerOnKeyUp:go,execCommand:function(e){if(ys.hasOwnProperty(e))return ys[e].call(null,this)},triggerElectric:fr(function(e){Io(this,e)}),findPosH:function(e,t,n,r){var i=this,o=1;t<0&&(o=-1,t=-t);for(var a=q(this.doc,e),s=0;s<t&&(a=Ho(i.doc,a,o,n,r),!a.hitSide);++s);return a},moveH:fr(function(e,t){var n=this;this.extendSelectionsBy(function(r){return n.display.shift||n.doc.extend||r.empty()?Ho(n.doc,r.head,e,t,n.options.rtlMoveVisually):e<0?r.from():r.to()},Ma)}),deleteH:fr(function(e,t){var n=this.doc.sel,r=this.doc;n.somethingSelected()?r.replaceSelection("",null,"+delete"):io(this,function(n){var i=Ho(r,n.head,e,t,!1);return e<0?{from:i,to:n.head}:{from:n.head,to:i}})}),findPosV:function(e,t,n,r){var i=this,o=1,a=r;t<0&&(o=-1,t=-t);for(var s=q(this.doc,e),l=0;l<t;++l){var c=pn(i,s,"div");if(null==a?a=c.left:c.left=a,s=Wo(i,c,o,n),s.hitSide)break}return s},moveV:fr(function(e,t){var n=this,r=this.doc,i=[],o=!this.display.shift&&!r.extend&&r.sel.somethingSelected();if(r.extendSelectionsBy(function(a){if(o)return e<0?a.from():a.to();var s=pn(n,a.head,"div");null!=a.goalColumn&&(s.left=a.goalColumn),i.push(s.left);var l=Wo(n,s,e,t);return"page"==t&&a==r.sel.primary()&&Qn(n,null,fn(n,l,"div").top-s.top),l},Ma),i.length)for(var a=0;a<r.sel.ranges.length;a++)r.sel.ranges[a].goalColumn=i[a]}),findWordAt:function(e){var t=this.doc,n=S(t,e.line).text,r=e.ch,i=e.ch;if(n){var o=this.getHelper(e,"wordChars");(e.xRel<0||i==n.length)&&r?--r:++i;for(var a=n.charAt(r),s=w(a,o)?function(e){return w(e,o)}:/\s/.test(a)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!w(e)};r>0&&s(n.charAt(r-1));)--r;for(;i<n.length&&s(n.charAt(i));)++i}return new Or(D(e.line,r),D(e.line,i))},toggleOverwrite:function(e){null!=e&&e==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?a(this.display.cursorDiv,"CodeMirror-overwrite"):ba(this.display.cursorDiv,"CodeMirror-overwrite"),Fe(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==o()},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:fr(function(e,t){null==e&&null==t||er(this),null!=e&&(this.curOp.scrollLeft=e),null!=t&&(this.curOp.scrollTop=t)}),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-Wt(this)-this.display.barHeight,width:e.scrollWidth-Wt(this)-this.display.barWidth,clientHeight:Kt(this),clientWidth:$t(this)}},scrollIntoView:fr(function(e,t){if(null==e?(e={from:this.doc.sel.primary().head,to:null},null==t&&(t=this.options.cursorScrollMargin)):"number"==typeof e?e={from:D(e,0),to:null}:null==e.from&&(e={from:e,to:null}),e.to||(e.to=e.from),e.margin=t||0,null!=e.from.line)er(this),this.curOp.scrollToPos=e;else{var n=Jn(this,Math.min(e.from.left,e.to.left),Math.min(e.from.top,e.to.top)-e.margin,Math.max(e.from.right,e.to.right),Math.max(e.from.bottom,e.to.bottom)+e.margin);this.scrollTo(n.scrollLeft,n.scrollTop)}}),setSize:fr(function(e,t){var n=this,r=function(e){return"number"==typeof e||/^\d+$/.test(String(e))?e+"px":e};null!=e&&(this.display.wrapper.style.width=r(e)),null!=t&&(this.display.wrapper.style.height=r(t)),this.options.lineWrapping&&on(this);var i=this.display.viewFrom;this.doc.iter(i,this.display.viewTo,function(e){if(e.widgets)for(var t=0;t<e.widgets.length;t++)if(e.widgets[t].noHScroll){hr(n,i,"widget");break}++i}),this.curOp.forceUpdate=!0,Fe(this,"refresh",this)}),operation:function(e){return cr(this,e)},refresh:fr(function(){var e=this.display.cachedTextHeight;dr(this),this.curOp.forceUpdate=!0,an(this),this.scrollTo(this.doc.scrollLeft,this.doc.scrollTop),Tr(this),(null==e||Math.abs(e-vn(this.display))>.5)&&kn(this),Fe(this,"refresh",this)}),swapDoc:fr(function(e){var t=this.doc;return t.cm=null,$r(this,e),an(this),this.display.input.reset(),this.scrollTo(e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,Ct(this,"swapDoc",this,t),t}),getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Ne(e),e.registerHelper=function(t,r,i){n.hasOwnProperty(t)||(n[t]=e[t]={_global:[]}),n[t][r]=i},e.registerGlobalHelper=function(t,r,i,o){e.registerHelper(t,r,o),n[t]._global.push({pred:i,val:o})}}function Ho(e,t,n,r,i){function o(){var t=s+n;return!(t<e.first||t>=e.first+e.size)&&(s=t,u=S(e,t))}function a(e){var t=(i?Se:Te)(u,l,n,!0);if(null==t){if(e||!o())return!1;l=i?(n<0?we:be)(u):n<0?u.text.length:0}else l=t;return!0}var s=t.line,l=t.ch,c=n,u=S(e,s);if("char"==r)a();else if("column"==r)a(!0);else if("word"==r||"group"==r)for(var f=null,p="group"==r,d=e.cm&&e.cm.getHelper(t,"wordChars"),h=!0;!(n<0)||a(!h);h=!1){var m=u.text.charAt(l)||"\n",g=w(m,d)?"w":p&&"\n"==m?"n":!p||/\s/.test(m)?null:"p";if(!p||h||g||(g="s"),f&&f!=g){n<0&&(n=1,a());break}if(g&&(f=g),n>0&&!a(!h))break}var v=vi(e,D(s,l),t,c,!0);return N(t,v)||(v.hitSide=!0),v}function Wo(e,t,n,r){var i,o=e.doc,a=t.left;if("page"==r){var s=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),l=Math.max(s-.5*vn(e.display),3);i=(n>0?t.bottom:t.top)+n*l}else"line"==r&&(i=n>0?t.bottom+3:t.top-3);for(var c;c=mn(e,a,i),c.outside;){if(n<0?i<=0:i>=o.height){c.hitSide=!0;break}i+=5*n}return c}function $o(e,t){var n=Yt(e,t.line);if(!n||n.hidden)return null;var r=S(e.doc,t.line),i=Vt(n,r,t.line),o=Ae(r),a="left";if(o){var s=_e(o,t.ch);a=s%2?"right":"left"}var l=Zt(i.map,t.ch,a);return l.offset="right"==l.collapse?l.end:l.start,l}function Ko(e,t){return t&&(e.bad=!0),e}function Uo(e,t,n,r,i){function o(e){return function(t){return t.id==e}}function a(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(null!=n)return void(s+=""==n?t.textContent.replace(/\u200b/g,""):n);var u,f=t.getAttribute("cm-marker");if(f){var p=e.findMarks(D(r,0),D(i+1,0),o(+f));return void(p.length&&(u=p[0].find())&&(s+=T(e.doc,u.from,u.to).join(c)))}if("false"==t.getAttribute("contenteditable"))return;for(var d=0;d<t.childNodes.length;d++)a(t.childNodes[d]);/^(pre|div|p)$/i.test(t.nodeName)&&(l=!0)}else if(3==t.nodeType){var h=t.nodeValue;if(!h)return;l&&(s+=c,l=!1),s+=h}}for(var s="",l=!1,c=e.doc.lineSeparator();a(t),t!=n;)t=t.nextSibling;return s}function Vo(e,t,n){var r;if(t==e.display.lineDiv){if(r=e.display.lineDiv.childNodes[n],!r)return Ko(e.clipPos(D(e.display.viewTo-1)),!0);t=null,n=0}else for(r=t;;r=r.parentNode){if(!r||r==e.display.lineDiv)return null;if(r.parentNode&&r.parentNode==e.display.lineDiv)break}for(var i=0;i<e.display.view.length;i++){var o=e.display.view[i];if(o.node==r)return Go(o,t,n)}}function Go(e,t,n){function r(t,n,r){for(var i=-1;i<(f?f.length:0);i++)for(var o=i<0?u.map:f[i],a=0;a<o.length;a+=3){var s=o[a+2];if(s==t||s==n){var l=L(i<0?e.line:e.rest[i]),c=o[a]+r;return(r<0||s!=t)&&(c=o[a+(r?1:0)]),D(l,c)}}}var o=e.text.firstChild,a=!1;if(!t||!i(o,t))return Ko(D(L(e.line),0),!0);if(t==o&&(a=!0,t=o.childNodes[n],n=0,!t)){var s=e.rest?m(e.rest):e.line;return Ko(D(L(s),s.text.length),a)}var l=3==t.nodeType?t:null,c=t;for(l||1!=t.childNodes.length||3!=t.firstChild.nodeType||(l=t.firstChild,n&&(n=l.nodeValue.length));c.parentNode!=o;)c=c.parentNode;var u=e.measure,f=u.maps,p=r(l,c,n);if(p)return Ko(p,a);for(var d=c.nextSibling,h=l?l.nodeValue.length-n:0;d;d=d.nextSibling){if(p=r(d,d.firstChild,0))return Ko(D(p.line,p.ch-h),a);h+=d.textContent.length}for(var g=c.previousSibling,v=n;g;g=g.previousSibling){if(p=r(g,g.firstChild,-1))return Ko(D(p.line,p.ch+v),a);v+=g.textContent.length}}function Xo(e,t){function n(){e.value=l.getValue()}if(t=t?c(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var r=o();t.autofocus=r==e||null!=e.getAttribute("autofocus")&&r==document.body}var i;if(e.form&&(Ia(e.form,"submit",n),!t.leaveSubmitMethodAlone)){var a=e.form;i=a.submit;try{var s=a.submit=function(){n(),a.submit=i,a.submit(),a.submit=s}}catch(e){}}t.finishInit=function(t){t.save=n,t.getTextArea=function(){return e},t.toTextArea=function(){t.toTextArea=isNaN,n(),e.parentNode.removeChild(t.getWrapperElement()),e.style.display="",e.form&&(Le(e.form,"submit",n),"function"==typeof e.form.submit&&(e.form.submit=i))}},e.style.display="none";var l=Oo(function(t){return e.parentNode.insertBefore(t,e.nextSibling)},t);return l}function Yo(e){e.off=Le,e.on=Ia,e.wheelEventPixels=Hn,e.Doc=ls,e.splitLines=qa,e.countColumn=u,e.findColumn=d,e.isWordChar=b,e.Pass=Sa,e.signal=Fe,e.Line=lt,e.changeEnd=Nr,e.scrollbarModel=rs,e.Pos=D,e.cmpPos=N,e.modes=Wa,e.mimeModes=$a,e.resolveMode=Ue,e.getMode=Ve,e.modeExtensions=Ka,e.extendMode=Ge,e.copyState=Xe,e.startState=Je,e.innerMode=Ye,e.commands=ys,e.keyMap=ms,e.keyName=no,e.isModifierKey=to,e.lookupKey=eo,e.normalizeKeyMap=Zi,e.StringStream=Ua,e.SharedTextMarker=qi,e.TextMarker=Ii,e.LineWidget=Ni,e.e_preventDefault=je,e.e_stopPropagation=Pe,e.e_stop=Re,e.addClass=a,e.contains=i,e.rmClass=ba,e.keyNames=fs}var Jo=navigator.userAgent,Qo=navigator.platform,Zo=/gecko\/\d/i.test(Jo),ea=/MSIE \d/.test(Jo),ta=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Jo),na=ea||ta,ra=na&&(ea?document.documentMode||6:ta[1]),ia=/WebKit\//.test(Jo),oa=ia&&/Qt\/\d+\.\d+/.test(Jo),aa=/Chrome\//.test(Jo),sa=/Opera\//.test(Jo),la=/Apple Computer/.test(navigator.vendor),ca=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(Jo),ua=/PhantomJS/.test(Jo),fa=/AppleWebKit/.test(Jo)&&/Mobile\/\w+/.test(Jo),pa=fa||/Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(Jo),da=fa||/Mac/.test(Qo),ha=/\bCrOS\b/.test(Jo),ma=/win/i.test(Qo),ga=sa&&Jo.match(/Version\/(\d*\.\d*)/);ga&&(ga=Number(ga[1])),ga&&ga>=15&&(sa=!1,ia=!0);var va,ya=da&&(oa||sa&&(null==ga||ga<12.11)),xa=Zo||na&&ra>=9,ba=function(t,n){var r=t.className,i=e(n).exec(r);if(i){var o=r.slice(i.index+i[0].length);t.className=r.slice(0,i.index)+(o?i[1]+o:"")}};va=document.createRange?function(e,t,n,r){var i=document.createRange();return i.setEnd(r||e,n),i.setStart(e,t),i}:function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch(e){return r}return r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",t),r};var wa=function(e){e.select()};fa?wa=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:na&&(wa=function(e){try{e.select()}catch(e){}}),f.prototype.set=function(e,t){clearTimeout(this.id),this.id=setTimeout(t,e)};var ka,_a,Ca=30,Sa={toString:function(){return"CodeMirror.Pass"}},Ta={scroll:!1},Aa={origin:"*mouse"},Ma={origin:"+move"},La=[""],Fa=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,Oa=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/,Ea=!1,Da=!1,Na=null,ja=function(){function e(e){return e<=247?n.charAt(e):1424<=e&&e<=1524?"R":1536<=e&&e<=1785?r.charAt(e-1536):1774<=e&&e<=2220?"r":8192<=e&&e<=8203?"w":8204==e?"b":"L"}function t(e,t,n){this.level=e,this.from=t,this.to=n}var n="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",r="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111",i=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,o=/[stwN]/,a=/[LRr]/,s=/[Lb1n]/,l=/[1n]/,c="L";return function(n){if(!i.test(n))return!1;for(var r=n.length,u=[],f=0;f<r;++f)u.push(e(n.charCodeAt(f)));for(var p=0,d=c;p<r;++p){var h=u[p];"m"==h?u[p]=d:d=h}for(var g=0,v=c;g<r;++g){var y=u[g];"1"==y&&"r"==v?u[g]="n":a.test(y)&&(v=y,"r"==y&&(u[g]="R"))}for(var x=1,b=u[0];x<r-1;++x){var w=u[x];"+"==w&&"1"==b&&"1"==u[x+1]?u[x]="1":","!=w||b!=u[x+1]||"1"!=b&&"n"!=b||(u[x]=b),b=w}for(var k=0;k<r;++k){var _=u[k];if(","==_)u[k]="N";else if("%"==_){var C=void 0;for(C=k+1;C<r&&"%"==u[C];++C);for(var S=k&&"!"==u[k-1]||C<r&&"1"==u[C]?"1":"N",T=k;T<C;++T)u[T]=S;k=C-1}}for(var A=0,M=c;A<r;++A){var L=u[A];"L"==M&&"1"==L?u[A]="L":a.test(L)&&(M=L)}for(var F=0;F<r;++F)if(o.test(u[F])){var O=void 0;for(O=F+1;O<r&&o.test(u[O]);++O);for(var E="L"==(F?u[F-1]:c),D="L"==(O<r?u[O]:c),N=E||D?"L":"R",j=F;j<O;++j)u[j]=N;F=O-1}for(var P,I=[],R=0;R<r;)if(s.test(u[R])){var q=R;for(++R;R<r&&s.test(u[R]);++R);I.push(new t(0,q,R))}else{var B=R,z=I.length;for(++R;R<r&&"L"!=u[R];++R);for(var H=B;H<R;)if(l.test(u[H])){B<H&&I.splice(z,0,new t(1,B,H));var W=H;for(++H;H<R&&l.test(u[H]);++H);I.splice(z,0,new t(2,W,H)),B=H}else++H;B<R&&I.splice(z,0,new t(1,B,R))}return 1==I[0].level&&(P=n.match(/^\s+/))&&(I[0].from=P[0].length,I.unshift(new t(0,0,P[0].length))),1==m(I).level&&(P=n.match(/\s+$/))&&(m(I).to-=P[0].length,I.push(new t(0,r-P[0].length,r))),2==I[0].level&&I.unshift(new t(1,I[0].to,I[0].to)),I[0].level!=m(I).level&&I.push(new t(I[0].level,r,r)),I}}(),Pa=[],Ia=function(e,t,n){if(e.addEventListener)e.addEventListener(t,n,!1);else if(e.attachEvent)e.attachEvent("on"+t,n);else{var r=e._handlers||(e._handlers={});r[t]=(r[t]||Pa).concat(n)}},Ra=function(){if(na&&ra<9)return!1;var e=r("div");return"draggable"in e||"dragDrop"in e}(),qa=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],r=e.length;t<=r;){var i=e.indexOf("\n",t);i==-1&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),a=o.indexOf("\r");a!=-1?(n.push(o.slice(0,a)),t+=a+1):(n.push(o),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},Ba=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},za=function(){var e=r("div");return"oncopy"in e||(e.setAttribute("oncopy","return;"),"function"==typeof e.oncopy)}(),Ha=null,Wa={},$a={},Ka={},Ua=function(e,t){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0};Ua.prototype={eol:function(){return this.pos>=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},eat:function(e){var t,n=this.string.charAt(this.pos);if(t="string"==typeof e?n==e:n&&(e.test?e.test(n):e(n)))return++this.pos,n},eatWhile:function(e){for(var t=this.pos;this.eat(e););return this.pos>t},eatSpace:function(){for(var e=this,t=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++e.pos;return this.pos>t},skipToEnd:function(){this.pos=this.string.length},skipTo:function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},backUp:function(e){this.pos-=e},column:function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=u(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?u(this.string,this.lineStart,this.tabSize):0)},indentation:function(){return u(this.string,null,this.tabSize)-(this.lineStart?u(this.string,this.lineStart,this.tabSize):0)},match:function(e,t,n){if("string"!=typeof e){var r=this.string.slice(this.pos).match(e);return r&&r.index>0?null:(r&&t!==!1&&(this.pos+=r[0].length),r)}var i=function(e){return n?e.toLowerCase():e},o=this.string.substr(this.pos,e.length);if(i(o)==i(e))return t!==!1&&(this.pos+=e.length),!0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}}},Ne(lt),lt.prototype.lineNo=function(){return L(this)};var Va,Ga={},Xa={},Ya=null,Ja=null,Qa={left:0,right:0,top:0,bottom:0},Za=0,es=null;na?es=-.53:Zo?es=15:aa?es=-.7:la&&(es=-1/3);var ts=function(e,t,n){this.cm=n;var i=this.vert=r("div",[r("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),o=this.horiz=r("div",[r("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");e(i),e(o),Ia(i,"scroll",function(){i.clientHeight&&t(i.scrollTop,"vertical")}),Ia(o,"scroll",function(){o.clientWidth&&t(o.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,na&&ra<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};ts.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=e.scrollWidth-e.clientWidth+o+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},ts.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz)},ts.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert)},ts.prototype.zeroWidthHack=function(){var e=da&&!ca?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new f,this.disableVert=new f},ts.prototype.enableZeroWidthBar=function(e,t){function n(){var r=e.getBoundingClientRect(),i=document.elementFromPoint(r.left+1,r.bottom-1);i!=e?e.style.pointerEvents="none":t.set(1e3,n)}e.style.pointerEvents="auto",t.set(1e3,n)},ts.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var ns=function(){};ns.prototype.update=function(){return{bottom:0,right:0}},ns.prototype.setScrollLeft=function(){},ns.prototype.setScrollTop=function(){},ns.prototype.clear=function(){};var rs={native:ts,null:ns},is=0,os=function(e,t,n){var r=e.display;this.viewport=t,this.visible=Rn(r,e.doc,t),this.editorIsHidden=!r.wrapper.offsetWidth,this.wrapperHeight=r.wrapper.clientHeight,this.wrapperWidth=r.wrapper.clientWidth,this.oldDisplayWidth=$t(e),this.force=n,this.dims=xn(e),this.events=[]};os.prototype.signal=function(e,t){De(e,t)&&this.events.push(arguments)},os.prototype.finish=function(){for(var e=this,t=0;t<this.events.length;t++)Fe.apply(null,e.events[t])},Fr.prototype={primary:function(){return this.ranges[this.primIndex]},equals:function(e){var t=this;if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var n=0;n<this.ranges.length;n++){var r=t.ranges[n],i=e.ranges[n];if(0!=N(r.anchor,i.anchor)||0!=N(r.head,i.head))return!1}return!0},deepCopy:function(){for(var e=this,t=[],n=0;n<this.ranges.length;n++)t[n]=new Or(j(e.ranges[n].anchor),j(e.ranges[n].head));return new Fr(t,this.primIndex)},somethingSelected:function(){for(var e=this,t=0;t<this.ranges.length;t++)if(!e.ranges[t].empty())return!0;return!1},contains:function(e,t){var n=this;t||(t=e);for(var r=0;r<this.ranges.length;r++){var i=n.ranges[r];if(N(t,i.from())>=0&&N(e,i.to())<=0)return r}return-1}},Or.prototype={from:function(){return I(this.anchor,this.head);
0 ignored issues
show
Coding Style Best Practice introduced by
Curly braces around statements make for more readable code and help prevent bugs when you add further statements.

Consider adding curly braces around all statements when they are executed conditionally. This is optional if there is only one statement, but leaving them out can lead to unexpected behaviour if another statement is added later.

Consider:

if (a > 0)
    b = 42;

If you or someone else later decides to put another statement in, only the first statement will be executed.

if (a > 0)
    console.log("a > 0");
    b = 42;

In this case the statement b = 42 will always be executed, while the logging statement will be executed conditionally.

if (a > 0) {
    console.log("a > 0");
    b = 42;
}

ensures that the proper code will be executed conditionally no matter how many statements are added or removed.

Loading history...
Bug introduced by
The variable isNaN seems to be never declared. If this is a global, consider adding a /** global: isNaN */ comment.

This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.

To learn more about declaring variables in Javascript, see the MDN.

Loading history...
Complexity Best Practice introduced by
There is no return statement if n is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Complexity Best Practice introduced by
There is no return statement if t > -1 is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Coding Style Best Practice introduced by
By convention, constructors like t should be capitalized.
Loading history...
Best Practice introduced by
There is no return statement in this branch, but you do return something in other branches. Did you maybe miss it? If you do not want to return anything, consider adding return undefined; explicitly.
Loading history...
Bug introduced by
The variable navigator seems to be never declared. If this is a global, consider adding a /** global: navigator */ comment.

This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.

To learn more about declaring variables in Javascript, see the MDN.

Loading history...
Complexity Best Practice introduced by
There is no return statement if ys.hasOwnProperty(e) is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
introduced by
The for loop does not have a body. Maybe you have misplaced a semicolon. If you do wish to have a loop without a body, use an empty body {}.
Loading history...
Complexity Best Practice introduced by
There is no return statement if this.pos < this.string.length is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Unused Code introduced by
The assignment to variable O seems to be never used. Consider removing it.
Loading history...
Coding Style Best Practice introduced by
By convention, constructors like f should be capitalized.
Loading history...
Complexity Best Practice introduced by
There is no return statement if t = "string" == typeof e....test ? e.test(n): e(n) is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Bug introduced by
The variable i does not seem to be initialized in case "page" == r on line 4 is false. Are you sure the function mn handles undefined variables?
Loading history...
Coding Style Comprehensibility Best Practice introduced by
Empty catch clauses should be used with caution; consider adding a comment why this is needed.
Loading history...
Bug introduced by
The variable c does not seem to be initialized in case "smart" == n && c = o.mo...xt), c == Sa || c > 150 on line 4 is false. Are you sure the function max handles undefined variables?
Loading history...
Coding Style introduced by
Consider using undefined instead of void(0). It is equivalent and more straightforward to read.
Loading history...
Bug introduced by
The variable i seems to not be initialized for all possible execution paths. Are you sure indent handles undefined variables?
Loading history...
Bug introduced by
The variable u seems to not be initialized for all possible execution paths.
Loading history...
Unused Code introduced by
The variable t seems to be never used. Consider removing it.
Loading history...
Bug introduced by
The variable i does not seem to be initialized in case e.form && Ia(e.form, "su....leaveSubmitMethodAlone on line 4 is false. Are you sure this can never be the case?
Loading history...
Complexity Best Practice introduced by
There is no return statement if i(o) == i(e) is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Comprehensibility introduced by
Usage of the sequence operator is discouraged, since it may lead to obfuscated code.

The sequence or comma operator allows the inclusion of multiple expressions where only is permitted. The result of the sequence is the value of the last expression.

This operator is most often used in for statements.

Used in another places it can make code hard to read, especially when people do not realize it even exists as a seperate operator.

This check looks for usage of the sequence operator in locations where it is not necessary and could be replaced by a series of expressions or statements.

var a,b,c;

a = 1, b = 1,  c= 3;

could just as well be written as:

var a,b,c;

a = 1;
b = 1;
c = 3;

To learn more about the sequence operator, please refer to the MDN.

Loading history...
Complexity Best Practice introduced by
There is no return statement if 3 == t.nodeType is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Unused Code introduced by
The assignment to variable C seems to be never used. Consider removing it.
Loading history...
5
},to:function(){return P(this.anchor,this.head)},empty:function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch}},Ei.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var n=this,r=e,i=e+t;r<i;++r){var o=n.lines[r];n.height-=o.height,ut(o),Ct(o,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,n){var r=this;this.height+=n,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var i=0;i<t.length;++i)t[i].parent=r},iterN:function(e,t,n){for(var r=this,i=e+t;e<i;++e)if(n(r.lines[e]))return!0}},Di.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){var n=this;this.size-=t;for(var r=0;r<this.children.length;++r){var i=n.children[r],o=i.chunkSize();if(e<o){var a=Math.min(t,o-e),s=i.height;if(i.removeInner(e,a),n.height-=s-i.height,o==a&&(n.children.splice(r--,1),i.parent=null),0==(t-=a))break;e=0}else e-=o}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof Ei))){var l=[];this.collapse(l),this.children=[new Ei(l)],this.children[0].parent=this}},collapse:function(e){for(var t=this,n=0;n<this.children.length;++n)t.children[n].collapse(e)},insertInner:function(e,t,n){var r=this;this.size+=t.length,this.height+=n;for(var i=0;i<this.children.length;++i){var o=r.children[i],a=o.chunkSize();if(e<=a){if(o.insertInner(e,t,n),o.lines&&o.lines.length>50){for(var s=o.lines.length%25+25,l=s;l<o.lines.length;){var c=new Ei(o.lines.slice(l,l+=25));o.height-=c.height,r.children.splice(++i,0,c),c.parent=r}o.lines=o.lines.slice(0,s),r.maybeSpill()}break}e-=a}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=e.children.splice(e.children.length-5,5),n=new Di(t);if(e.parent){e.size-=n.size,e.height-=n.height;var r=p(e.parent.children,e);e.parent.children.splice(r+1,0,n)}else{var i=new Di(e.children);i.parent=e,e.children=[i,n],e=i}n.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=this,i=0;i<this.children.length;++i){var o=r.children[i],a=o.chunkSize();if(e<a){var s=Math.min(t,a-e);if(o.iterN(e,s,n))return!0;if(0==(t-=s))break;e=0}else e-=a}}},Ne(Ni),Ni.prototype.clear=function(){var e=this,t=this.doc.cm,n=this.line.widgets,r=this.line,i=L(r);if(null!=i&&n){for(var o=0;o<n.length;++o)n[o]==e&&n.splice(o--,1);n.length||(r.widgets=null);var a=Rt(this);M(r,Math.max(0,r.height-a)),t&&cr(t,function(){ji(t,r,-a),hr(t,i,"widget")})}},Ni.prototype.changed=function(){var e=this.height,t=this.doc.cm,n=this.line;this.height=null;var r=Rt(this)-e;r&&(M(n,n.height+r),t&&cr(t,function(){t.curOp.forceUpdate=!0,ji(t,n,r)}))};var as=0;Ne(Ii),Ii.prototype.clear=function(){var e=this;if(!this.explicitlyCleared){var t=this.doc.cm,n=t&&!t.curOp;if(n&&tr(t),De(this,"clear")){var r=this.find();r&&Ct(this,"clear",r.from,r.to)}for(var i=null,o=null,a=0;a<this.lines.length;++a){var s=e.lines[a],l=K(s.markedSpans,e);t&&!e.collapsed?hr(t,L(s),"text"):t&&(null!=l.to&&(o=L(s)),null!=l.from&&(i=L(s))),s.markedSpans=U(s.markedSpans,l),null==l.from&&e.collapsed&&!pe(e.doc,s)&&t&&M(s,vn(t.display))}if(t&&this.collapsed&&!t.options.lineWrapping)for(var c=0;c<this.lines.length;++c){var u=le(e.lines[c]),f=me(u);f>t.display.maxLineLength&&(t.display.maxLine=u,t.display.maxLineLength=f,t.display.maxLineChanged=!0)}null!=i&&t&&this.collapsed&&dr(t,i,o+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,t&&hi(t.doc)),t&&Ct(t,"markerCleared",t,this),n&&nr(t),this.parent&&this.parent.clear()}},Ii.prototype.find=function(e,t){var n=this;null==e&&"bookmark"==this.type&&(e=1);for(var r,i,o=0;o<this.lines.length;++o){var a=n.lines[o],s=K(a.markedSpans,n);if(null!=s.from&&(r=D(t?a:L(a),s.from),e==-1))return r;if(null!=s.to&&(i=D(t?a:L(a),s.to),1==e))return i}return r&&{from:r,to:i}},Ii.prototype.changed=function(){var e=this.find(-1,!0),t=this,n=this.doc.cm;e&&n&&cr(n,function(){var r=e.line,i=L(e.line),o=Yt(n,i);if(o&&(rn(o),n.curOp.selectionChanged=n.curOp.forceUpdate=!0),n.curOp.updateMaxLine=!0,!pe(t.doc,r)&&null!=t.height){var a=t.height;t.height=null;var s=Rt(t)-a;s&&M(r,r.height+s)}})},Ii.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;t.maybeHiddenMarkers&&p(t.maybeHiddenMarkers,this)!=-1||(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},Ii.prototype.detachLine=function(e){if(this.lines.splice(p(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},Ne(qi),qi.prototype.clear=function(){var e=this;if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var t=0;t<this.markers.length;++t)e.markers[t].clear();Ct(this,"clear")}},qi.prototype.find=function(e,t){return this.primary.find(e,t)};var ss=0,ls=function(e,t,n,r){if(!(this instanceof ls))return new ls(e,t,n,r);null==n&&(n=0),Di.call(this,[new Ei([new lt("",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.frontier=n;var i=D(n,0);this.sel=Dr(i),this.history=new Kr(null),this.id=++ss,this.modeOption=t,this.lineSep=r,this.extend=!1,"string"==typeof e&&(e=this.splitLines(e)),Hr(this,{from:i,to:i,text:e}),fi(this,Dr(i),Ta)};ls.prototype=x(Di.prototype,{constructor:ls,iter:function(e,t,n){n?this.iterN(e-this.first,t-e,n):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var n=0,r=0;r<t.length;++r)n+=t[r].height;this.insertInner(e-this.first,t,n)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=A(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:pr(function(e){var t=D(this.first,0),n=this.first+this.size-1;wi(this,{from:t,to:D(n,S(this,n).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),fi(this,Dr(t))}),replaceRange:function(e,t,n,r){t=q(this,t),n=n?q(this,n):t,Ai(this,e,t,n,r)},getRange:function(e,t,n){var r=T(this,q(this,e),q(this,t));return n===!1?r:r.join(n||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(O(this,e))return S(this,e)},getLineNumber:function(e){return L(e)},getLineHandleVisualStart:function(e){return"number"==typeof e&&(e=S(this,e)),le(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return q(this,e)},getCursor:function(e){var t,n=this.sel.primary();return t=null==e||"head"==e?n.head:"anchor"==e?n.anchor:"end"==e||"to"==e||e===!1?n.to():n.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:pr(function(e,t,n){li(this,q(this,"number"==typeof e?D(e,t||0):e),null,n)}),setSelection:pr(function(e,t,n){li(this,q(this,e),q(this,t||e),n)}),extendSelection:pr(function(e,t,n){oi(this,q(this,e),t&&q(this,t),n)}),extendSelections:pr(function(e,t){ai(this,z(this,e),t)}),extendSelectionsBy:pr(function(e,t){var n=g(this.sel.ranges,e);ai(this,z(this,n),t)}),setSelections:pr(function(e,t,n){var r=this;if(e.length){for(var i=[],o=0;o<e.length;o++)i[o]=new Or(q(r,e[o].anchor),q(r,e[o].head));null==t&&(t=Math.min(e.length-1,this.sel.primIndex)),fi(this,Er(i,t),n)}}),addSelection:pr(function(e,t,n){var r=this.sel.ranges.slice(0);r.push(new Or(q(this,e),q(this,t||e))),fi(this,Er(r,r.length-1),n)}),getSelection:function(e){for(var t,n=this,r=this.sel.ranges,i=0;i<r.length;i++){var o=T(n,r[i].from(),r[i].to());t=t?t.concat(o):o}return e===!1?t:t.join(e||this.lineSeparator())},getSelections:function(e){for(var t=this,n=[],r=this.sel.ranges,i=0;i<r.length;i++){var o=T(t,r[i].from(),r[i].to());e!==!1&&(o=o.join(e||t.lineSeparator())),n[i]=o}return n},replaceSelection:function(e,t,n){for(var r=[],i=0;i<this.sel.ranges.length;i++)r[i]=e;this.replaceSelections(r,t,n||"+input")},replaceSelections:pr(function(e,t,n){for(var r=this,i=[],o=this.sel,a=0;a<o.ranges.length;a++){var s=o.ranges[a];i[a]={from:s.from(),to:s.to(),text:r.splitLines(e[a]),origin:n}}for(var l=t&&"end"!=t&&Rr(this,i,t),c=i.length-1;c>=0;c--)wi(r,i[c]);l?ui(this,l):this.cm&&Zn(this.cm)}),undo:pr(function(){_i(this,"undo")}),redo:pr(function(){_i(this,"redo")}),undoSelection:pr(function(){_i(this,"undo",!0)}),redoSelection:pr(function(){_i(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r<e.done.length;r++)e.done[r].ranges||++t;for(var i=0;i<e.undone.length;i++)e.undone[i].ranges||++n;return{undo:t,redo:n}},clearHistory:function(){this.history=new Kr(this.history.maxGeneration)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:ri(this.history.done),undone:ri(this.history.undone)}},setHistory:function(e){var t=this.history=new Kr(this.history.maxGeneration);t.done=ri(e.done.slice(0),null,!0),t.undone=ri(e.undone.slice(0),null,!0)},setGutterMarker:pr(function(e,t,n){return Oi(this,e,"gutter",function(e){var r=e.gutterMarkers||(e.gutterMarkers={});return r[t]=n,!n&&k(r)&&(e.gutterMarkers=null),!0})}),clearGutter:pr(function(e){var t=this;this.iter(function(n){n.gutterMarkers&&n.gutterMarkers[e]&&Oi(t,n,"gutter",function(){return n.gutterMarkers[e]=null,k(n.gutterMarkers)&&(n.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if("number"==typeof e){if(!O(this,e))return null;if(t=e,e=S(this,e),!e)return null}else if(t=L(e),null==t)return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:pr(function(t,n,r){return Oi(this,t,"gutter"==n?"gutter":"class",function(t){var i="text"==n?"textClass":"background"==n?"bgClass":"gutter"==n?"gutterClass":"wrapClass";if(t[i]){if(e(r).test(t[i]))return!1;t[i]+=" "+r}else t[i]=r;return!0})}),removeLineClass:pr(function(t,n,r){return Oi(this,t,"gutter"==n?"gutter":"class",function(t){var i="text"==n?"textClass":"background"==n?"bgClass":"gutter"==n?"gutterClass":"wrapClass",o=t[i];if(!o)return!1;if(null==r)t[i]=null;else{var a=o.match(e(r));if(!a)return!1;var s=a.index+a[0].length;t[i]=o.slice(0,a.index)+(a.index&&s!=o.length?" ":"")+o.slice(s)||null}return!0})}),addLineWidget:pr(function(e,t,n){return Pi(this,e,t,n)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,n){return Ri(this,q(this,e),q(this,t),n,n&&n.type||"range")},setBookmark:function(e,t){var n={replacedWith:t&&(null==t.nodeType?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return e=q(this,e),Ri(this,e,e,n,"bookmark")},findMarksAt:function(e){e=q(this,e);var t=[],n=S(this,e.line).markedSpans;if(n)for(var r=0;r<n.length;++r){var i=n[r];(null==i.from||i.from<=e.ch)&&(null==i.to||i.to>=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=q(this,e),t=q(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,function(o){var a=o.markedSpans;if(a)for(var s=0;s<a.length;s++){var l=a[s];null!=l.to&&i==e.line&&e.ch>=l.to||null==l.from&&i!=e.line||null!=l.from&&i==t.line&&l.from>=t.ch||n&&!n(l.marker)||r.push(l.marker.parent||l.marker)}++i}),r},getAllMarks:function(){var e=[];return this.iter(function(t){var n=t.markedSpans;if(n)for(var r=0;r<n.length;++r)null!=n[r].from&&e.push(n[r].marker)}),e},posFromIndex:function(e){var t,n=this.first,r=this.lineSeparator().length;return this.iter(function(i){var o=i.text.length+r;return o>e?(t=e,!0):(e-=o,void++n)}),q(this,D(n,t))},indexFromPos:function(e){e=q(this,e);var t=e.ch;if(e.line<this.first||e.ch<0)return 0;var n=this.lineSeparator().length;return this.iter(this.first,e.line,function(e){t+=e.text.length+n}),t},copy:function(e){var t=new ls(A(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,n=this.first+this.size;null!=e.from&&e.from>t&&(t=e.from),null!=e.to&&e.to<n&&(n=e.to);var r=new ls(A(this,t,n),e.mode||this.modeOption,t,this.lineSep);return e.sharedHist&&(r.history=this.history),(this.linked||(this.linked=[])).push({doc:r,sharedHist:e.sharedHist}),r.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],Hi(r,zi(this)),r},unlinkDoc:function(e){var t=this;if(e instanceof Oo&&(e=e.doc),this.linked)for(var n=0;n<this.linked.length;++n){var r=t.linked[n];if(r.doc==e){t.linked.splice(n,1),e.unlinkDoc(t),Wi(zi(t));break}}if(e.history==this.history){var i=[e.id];Wr(e,function(e){return i.push(e.id)},!0),e.history=new Kr(null),e.history.done=ri(this.history.done,i),e.history.undone=ri(this.history.undone,i)}},iterLinkedDocs:function(e){Wr(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):qa(e)},lineSeparator:function(){return this.lineSep||"\n"}}),ls.prototype.eachLine=ls.prototype.iter;for(var cs=0,us=!1,fs={3:"Enter",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",127:"Delete",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},ps=0;ps<10;ps++)fs[ps+48]=fs[ps+96]=String(ps);for(var ds=65;ds<=90;ds++)fs[ds]=String.fromCharCode(ds);for(var hs=1;hs<=12;hs++)fs[hs+111]=fs[hs+63235]="F"+hs;var ms={};ms.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},ms.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},ms.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},ms.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},ms.default=da?ms.macDefault:ms.pcDefault;var gs,vs,ys={selectAll:xi,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Ta)},killLine:function(e){return io(e,function(t){if(t.empty()){var n=S(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line<e.lastLine()?{from:t.head,to:D(t.head.line+1,0)}:{from:t.head,to:D(t.head.line,n)}}return{from:t.from(),to:t.to()}})},deleteLine:function(e){return io(e,function(t){return{from:D(t.from().line,0),to:q(e.doc,D(t.to().line+1,0))}})},delLineLeft:function(e){return io(e,function(e){return{from:D(e.from().line,0),to:e.from()}})},delWrappedLineLeft:function(e){return io(e,function(t){var n=e.charCoords(t.head,"div").top+5,r=e.coordsChar({left:0,top:n},"div");return{from:r,to:t.from()}})},delWrappedLineRight:function(e){return io(e,function(t){var n=e.charCoords(t.head,"div").top+5,r=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div");return{from:t.from(),to:r}})},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(D(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(D(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return oo(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return so(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return ao(e,t.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(t){var n=e.charCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div")},Ma)},goLineLeft:function(e){return e.extendSelectionsBy(function(t){var n=e.charCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:n},"div")},Ma)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(t){var n=e.charCoords(t.head,"div").top+5,r=e.coordsChar({left:0,top:n},"div");return r.ch<e.getLine(r.line).search(/\S/)?so(e,t.head):r},Ma)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"char")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection("\t")},insertSoftTab:function(e){for(var t=[],n=e.listSelections(),r=e.options.tabSize,i=0;i<n.length;i++){var o=n[i].from(),a=u(e.getLine(o.line),o.ch,r);t.push(h(r-a%r))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return cr(e,function(){for(var t=e.listSelections(),n=[],r=0;r<t.length;r++)if(t[r].empty()){var i=t[r].head,o=S(e.doc,i.line).text;if(o)if(i.ch==o.length&&(i=new D(i.line,i.ch-1)),i.ch>0)i=new D(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),D(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var a=S(e.doc,i.line-1).text;a&&(i=new D(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),D(i.line-1,a.length-1),i,"+transpose"))}n.push(new Or(i,i))}e.setSelections(n)})},newlineAndIndent:function(e){return cr(e,function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var r=0;r<t.length;r++)e.indentLine(t[r].from().line,null,!0);Zn(e)})},openLine:function(e){return e.replaceSelection("\n","start")},toggleOverwrite:function(e){return e.toggleOverwrite()}},xs=new f,bs=null,ws={toString:function(){return"CodeMirror.Init"}},ks={},_s={};Oo.defaults=ks,Oo.optionHandlers=_s;var Cs=[];Oo.defineInitHook=function(e){return Cs.push(e)};var Ss=null,Ts=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new f,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Ts.prototype.init=function(e){function t(e){if(!Oe(i,e)){if(i.somethingSelected())No({lineWise:!1,text:i.getSelections()}),"cut"==e.type&&i.replaceSelection("",null,"cut");else{if(!i.options.lineWiseCopyCut)return;var t=Ro(i);No({lineWise:!0,text:t.text}),"cut"==e.type&&i.operation(function(){i.setSelections(t.ranges,0,Ta),i.replaceSelection("",null,"cut")})}if(e.clipboardData){e.clipboardData.clearData();var n=Ss.text.join("\n");if(e.clipboardData.setData("Text",n),e.clipboardData.getData("Text")==n)return void e.preventDefault()}var a=Bo(),s=a.firstChild;i.display.lineSpace.insertBefore(a,i.display.lineSpace.firstChild),s.value=Ss.text.join("\n");var l=document.activeElement;wa(s),setTimeout(function(){i.display.lineSpace.removeChild(a),l.focus(),l==o&&r.showPrimarySelection()},50)}}var n=this,r=this,i=r.cm,o=r.div=e.lineDiv;qo(o,i.options.spellcheck),Ia(o,"paste",function(e){Oe(i,e)||Po(e,i)||ra<=11&&setTimeout(ur(i,function(){r.pollContent()||dr(i)}),20)}),Ia(o,"compositionstart",function(e){n.composing={data:e.data,done:!1}}),Ia(o,"compositionupdate",function(e){n.composing||(n.composing={data:e.data,done:!1})}),Ia(o,"compositionend",function(e){n.composing&&(e.data!=n.composing.data&&n.readFromDOMSoon(),n.composing.done=!0)}),Ia(o,"touchstart",function(){return r.forceCompositionEnd()}),Ia(o,"input",function(){n.composing||n.readFromDOMSoon()}),Ia(o,"copy",t),Ia(o,"cut",t)},Ts.prototype.prepareSelection=function(){var e=Tn(this.cm,!1);return e.focus=this.cm.state.focused,e},Ts.prototype.showSelection=function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},Ts.prototype.showPrimarySelection=function(){var e=window.getSelection(),t=this.cm.doc.sel.primary(),n=Vo(this.cm,e.anchorNode,e.anchorOffset),r=Vo(this.cm,e.focusNode,e.focusOffset);if(!n||n.bad||!r||r.bad||0!=N(I(n,r),t.from())||0!=N(P(n,r),t.to())){var i=$o(this.cm,t.from()),o=$o(this.cm,t.to());if(i||o){var a=this.cm.display.view,s=e.rangeCount&&e.getRangeAt(0);if(i){if(!o){var l=a[a.length-1].measure,c=l.maps?l.maps[l.maps.length-1]:l.map;o={node:c[c.length-1],offset:c[c.length-2]-c[c.length-3]}}}else i={node:a[0].measure.map[2],offset:0};var u;try{u=va(i.node,i.offset,o.offset,o.node)}catch(e){}u&&(!Zo&&this.cm.state.focused?(e.collapse(i.node,i.offset),u.collapsed||(e.removeAllRanges(),e.addRange(u))):(e.removeAllRanges(),e.addRange(u)),s&&null==e.anchorNode?e.addRange(s):Zo&&this.startGracePeriod()),this.rememberSelection()}}},Ts.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){return e.cm.curOp.selectionChanged=!0})},20)},Ts.prototype.showMultipleSelections=function(e){n(this.cm.display.cursorDiv,e.cursors),n(this.cm.display.selectionDiv,e.selection)},Ts.prototype.rememberSelection=function(){var e=window.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},Ts.prototype.selectionInEditor=function(){var e=window.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return i(this.div,t)},Ts.prototype.focus=function(){"nocursor"!=this.cm.options.readOnly&&(this.selectionInEditor()||this.showSelection(this.prepareSelection(),!0),this.div.focus())},Ts.prototype.blur=function(){this.div.blur()},Ts.prototype.getField=function(){return this.div},Ts.prototype.supportsTouch=function(){return!0},Ts.prototype.receivedFocus=function(){function e(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,e))}var t=this;this.selectionInEditor()?this.pollSelection():cr(this.cm,function(){return t.cm.curOp.selectionChanged=!0}),this.polling.set(this.cm.options.pollInterval,e)},Ts.prototype.selectionChanged=function(){var e=window.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},Ts.prototype.pollSelection=function(){if(!this.composing&&null==this.readDOMTimeout&&!this.gracePeriod&&this.selectionChanged()){var e=window.getSelection(),t=this.cm;this.rememberSelection();var n=Vo(t,e.anchorNode,e.anchorOffset),r=Vo(t,e.focusNode,e.focusOffset);n&&r&&cr(t,function(){fi(t.doc,Dr(n,r),Ta),(n.bad||r.bad)&&(t.curOp.selectionChanged=!0)})}},Ts.prototype.pollContent=function(){null!=this.readDOMTimeout&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,t=e.display,n=e.doc.sel.primary(),r=n.from(),i=n.to();if(0==r.ch&&r.line>e.firstLine()&&(r=D(r.line-1,S(e.doc,r.line-1).length)),i.ch==S(e.doc,i.line).text.length&&i.line<e.lastLine()&&(i=D(i.line+1,0)),r.line<t.viewFrom||i.line>t.viewTo-1)return!1;var o,a,s;r.line==t.viewFrom||0==(o=Cn(e,r.line))?(a=L(t.view[0].line),s=t.view[0].node):(a=L(t.view[o].line),s=t.view[o-1].node.nextSibling);var l,c,u=Cn(e,i.line);if(u==t.view.length-1?(l=t.viewTo-1,c=t.lineDiv.lastChild):(l=L(t.view[u+1].line)-1,c=t.view[u+1].node.previousSibling),!s)return!1;for(var f=e.doc.splitLines(Uo(e,s,c,a,l)),p=T(e.doc,D(a,0),D(l,S(e.doc,l).text.length));f.length>1&&p.length>1;)if(m(f)==m(p))f.pop(),p.pop(),l--;else{if(f[0]!=p[0])break;f.shift(),p.shift(),a++}for(var d=0,h=0,g=f[0],v=p[0],y=Math.min(g.length,v.length);d<y&&g.charCodeAt(d)==v.charCodeAt(d);)++d;for(var x=m(f),b=m(p),w=Math.min(x.length-(1==f.length?d:0),b.length-(1==p.length?d:0));h<w&&x.charCodeAt(x.length-h-1)==b.charCodeAt(b.length-h-1);)++h;f[f.length-1]=x.slice(0,x.length-h).replace(/^\u200b+/,""),f[0]=f[0].slice(d).replace(/\u200b+$/,"");var k=D(a,d),_=D(l,p.length?m(p).length-h:0);return f.length>1||f[0]||N(k,_)?(Ai(e.doc,f,k,_,"+input"),!0):void 0},Ts.prototype.ensurePolled=function(){this.forceCompositionEnd()},Ts.prototype.reset=function(){this.forceCompositionEnd()},Ts.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.pollContent()||dr(this.cm),this.div.blur(),this.div.focus())},Ts.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}!e.cm.isReadOnly()&&e.pollContent()||cr(e.cm,function(){return dr(e.cm)})},80))},Ts.prototype.setUneditable=function(e){e.contentEditable="false"},Ts.prototype.onKeyPress=function(e){e.preventDefault(),this.cm.isReadOnly()||ur(this.cm,jo)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0)},Ts.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},Ts.prototype.onContextMenu=function(){},Ts.prototype.resetPosition=function(){},Ts.prototype.needsContentAttribute=!0;var As=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new f,this.inaccurateSelection=!1,this.hasSelection=!1,this.composing=null};As.prototype.init=function(e){function t(e){if(!Oe(i,e)){if(i.somethingSelected())No({lineWise:!1,text:i.getSelections()}),r.inaccurateSelection&&(r.prevInput="",r.inaccurateSelection=!1,a.value=Ss.text.join("\n"),wa(a));else{if(!i.options.lineWiseCopyCut)return;var t=Ro(i);No({lineWise:!0,text:t.text}),"cut"==e.type?i.setSelections(t.ranges,null,Ta):(r.prevInput="",a.value=t.text.join("\n"),wa(a))}"cut"==e.type&&(i.state.cutIncoming=!0)}}var n=this,r=this,i=this.cm,o=this.wrapper=Bo(),a=this.textarea=o.firstChild;e.wrapper.insertBefore(o,e.wrapper.firstChild),fa&&(a.style.width="0px"),Ia(a,"input",function(){na&&ra>=9&&n.hasSelection&&(n.hasSelection=null),r.poll()}),Ia(a,"paste",function(e){Oe(i,e)||Po(e,i)||(i.state.pasteIncoming=!0,r.fastPoll())}),Ia(a,"cut",t),Ia(a,"copy",t),Ia(e.scroller,"paste",function(t){qt(e,t)||Oe(i,t)||(i.state.pasteIncoming=!0,r.focus())}),Ia(e.lineSpace,"selectstart",function(t){qt(e,t)||je(t)}),Ia(a,"compositionstart",function(){var e=i.getCursor("from");r.composing&&r.composing.range.clear(),r.composing={start:e,range:i.markText(e,i.getCursor("to"),{className:"CodeMirror-composing"})}}),Ia(a,"compositionend",function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)})},As.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=Tn(e);if(e.options.moveInputWithCursor){var i=pn(e,n.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+a.top-o.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+a.left-o.left))}return r},As.prototype.showSelection=function(e){var t=this.cm,r=t.display;n(r.cursorDiv,e.cursors),n(r.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},As.prototype.reset=function(e){if(!this.contextMenuPending){var t,n,r=this.cm,i=r.doc;if(r.somethingSelected()){this.prevInput="";var o=i.sel.primary();t=za&&(o.to().line-o.from().line>100||(n=r.getSelection()).length>1e3);var a=t?"-":n||r.getSelection();this.textarea.value=a,r.state.focused&&wa(this.textarea),na&&ra>=9&&(this.hasSelection=a)}else e||(this.prevInput=this.textarea.value="",na&&ra>=9&&(this.hasSelection=null));this.inaccurateSelection=t}},As.prototype.getField=function(){return this.textarea},As.prototype.supportsTouch=function(){return!1},As.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!pa||o()!=this.textarea))try{this.textarea.focus()}catch(e){}},As.prototype.blur=function(){this.textarea.blur()},As.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},As.prototype.receivedFocus=function(){this.slowPoll()},As.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},As.prototype.fastPoll=function(){function e(){var r=n.poll();r||t?(n.pollingFast=!1,n.slowPoll()):(t=!0,n.polling.set(60,e))}var t=!1,n=this;n.pollingFast=!0,n.polling.set(20,e)},As.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||!t.state.focused||Ba(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=n.value;if(i==r&&!t.somethingSelected())return!1;if(na&&ra>=9&&this.hasSelection===i||da&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(8203!=o||r||(r="​"),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var a=0,s=Math.min(r.length,i.length);a<s&&r.charCodeAt(a)==i.charCodeAt(a);)++a;return cr(t,function(){jo(t,i.slice(a),r.length-a,null,e.composing?"*compose":null),
0 ignored issues
show
Bug introduced by
The variable o seems to not be initialized for all possible execution paths.
Loading history...
Bug introduced by
The variable i seems to not be initialized for all possible execution paths.
Loading history...
Bug introduced by
The variable t seems to not be initialized for all possible execution paths.
Loading history...
Best Practice introduced by
There is no return statement in this branch, but you do return something in other branches. Did you maybe miss it? If you do not want to return anything, consider adding return undefined; explicitly.
Loading history...
Comprehensibility introduced by
Are you sure you want to assign to t here, or did you intend to make a comparison like t === null == e || "head...= !1 ? n.to(): n.from()?
Loading history...
Coding Style Best Practice introduced by
By convention, constructors like lt should be capitalized.
Loading history...
Coding Style Best Practice introduced by
Curly braces around statements make for more readable code and help prevent bugs when you add further statements.

Consider adding curly braces around all statements when they are executed conditionally. This is optional if there is only one statement, but leaving them out can lead to unexpected behaviour if another statement is added later.

Consider:

if (a > 0)
    b = 42;

If you or someone else later decides to put another statement in, only the first statement will be executed.

if (a > 0)
    console.log("a > 0");
    b = 42;

In this case the statement b = 42 will always be executed, while the logging statement will be executed conditionally.

if (a > 0) {
    console.log("a > 0");
    b = 42;
}

ensures that the proper code will be executed conditionally no matter how many statements are added or removed.

Loading history...
Coding Style Best Practice introduced by
By convention, constructors like f should be capitalized.
Loading history...
Complexity Best Practice introduced by
There is no return statement if O(this, e) is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Unused Code introduced by
The variable t seems to be never used. Consider removing it.
Loading history...
Coding Style Comprehensibility Best Practice introduced by
Empty catch clauses should be used with caution; consider adding a comment why this is needed.
Loading history...
Complexity Best Practice introduced by
There is no return statement if !Oe(i, e) is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Coding Style introduced by
Consider using undefined instead of void(0). It is equivalent and more straightforward to read.
Loading history...
Comprehensibility introduced by
Usage of the sequence operator is discouraged, since it may lead to obfuscated code.

The sequence or comma operator allows the inclusion of multiple expressions where only is permitted. The result of the sequence is the value of the last expression.

This operator is most often used in for statements.

Used in another places it can make code hard to read, especially when people do not realize it even exists as a seperate operator.

This check looks for usage of the sequence operator in locations where it is not necessary and could be replaced by a series of expressions or statements.

var a,b,c;

a = 1, b = 1,  c= 3;

could just as well be written as:

var a,b,c;

a = 1;
b = 1;
c = 3;

To learn more about the sequence operator, please refer to the MDN.

Loading history...
Coding Style Best Practice introduced by
By convention, constructors like ls should be capitalized.
Loading history...
6
i.length>1e3||i.indexOf("\n")>-1?n.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},As.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},As.prototype.onKeyPress=function(){na&&ra>=9&&(this.hasSelection=null),this.fastPoll()},As.prototype.onContextMenu=function(e){function t(){if(null!=a.selectionStart){var e=i.somethingSelected(),t="​"+(e?a.value:"");a.value="⇚",a.value=t,r.prevInput=e?"":"​",a.selectionStart=1,a.selectionEnd=t.length,o.selForContextMenu=i.doc.sel}}function n(){if(r.contextMenuPending=!1,r.wrapper.style.cssText=f,a.style.cssText=u,na&&ra<9&&o.scrollbars.setScrollTop(o.scroller.scrollTop=l),null!=a.selectionStart){(!na||na&&ra<9)&&t();var e=0,n=function(){o.selForContextMenu==i.doc.sel&&0==a.selectionStart&&a.selectionEnd>0&&"​"==r.prevInput?ur(i,xi)(i):e++<10?o.detectingSelectAll=setTimeout(n,500):o.input.reset()};o.detectingSelectAll=setTimeout(n,200)}}var r=this,i=r.cm,o=i.display,a=r.textarea,s=_n(i,e),l=o.scroller.scrollTop;if(s&&!sa){var c=i.options.resetSelectionOnContextMenu;c&&i.doc.sel.contains(s)==-1&&ur(i,fi)(i.doc,Dr(s),Ta);var u=a.style.cssText,f=r.wrapper.style.cssText;r.wrapper.style.cssText="position: absolute";var p=r.wrapper.getBoundingClientRect();a.style.cssText="position: absolute; width: 30px; height: 30px;\n      top: "+(e.clientY-p.top-5)+"px; left: "+(e.clientX-p.left-5)+"px;\n      z-index: 1000; background: "+(na?"rgba(255, 255, 255, .05)":"transparent")+";\n      outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";var d;if(ia&&(d=window.scrollY),o.input.focus(),ia&&window.scrollTo(null,d),o.input.reset(),i.somethingSelected()||(a.value=r.prevInput=" "),r.contextMenuPending=!0,o.selForContextMenu=i.doc.sel,clearTimeout(o.detectingSelectAll),na&&ra>=9&&t(),xa){Re(e);var h=function(){Le(window,"mouseup",h),setTimeout(n,20)};Ia(window,"mouseup",h)}else setTimeout(n,50)}},As.prototype.readOnlyChanged=function(e){e||this.reset()},As.prototype.setUneditable=function(){},As.prototype.needsContentAttribute=!1,Ao(Oo),zo(Oo);var Ms="iter insert remove copy getEditor constructor".split(" ");for(var Ls in ls.prototype)ls.prototype.hasOwnProperty(Ls)&&p(Ms,Ls)<0&&(Oo.prototype[Ls]=function(e){return function(){return e.apply(this.doc,arguments)}}(ls.prototype[Ls]));return Ne(ls),Oo.inputStyles={textarea:As,contenteditable:Ts},Oo.defineMode=function(e){Oo.defaults.mode||"null"==e||(Oo.defaults.mode=e),$e.apply(this,arguments)},Oo.defineMIME=Ke,Oo.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Oo.defineMIME("text/plain","null"),Oo.defineExtension=function(e,t){Oo.prototype[e]=t},Oo.defineDocExtension=function(e,t){ls.prototype[e]=t},Oo.fromTextArea=Xo,Yo(Oo),Oo.version="5.23.0",Oo})},function(e,t,n){var r,i;r=[n(0),n(1),n(49),n(68)],i=function(e,t,n){"use strict";var r,i=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,o=e.fn.init=function(o,a,s){var l,c;if(!o)return this;if(s=s||r,"string"==typeof o){if(l="<"===o[0]&&">"===o[o.length-1]&&o.length>=3?[null,o,null]:i.exec(o),!l||!l[1]&&a)return!a||a.jquery?(a||s).find(o):this.constructor(a).find(o);if(l[1]){if(a=a instanceof e?a[0]:a,e.merge(this,e.parseHTML(l[1],a&&a.nodeType?a.ownerDocument||a:t,!0)),n.test(l[1])&&e.isPlainObject(a))for(l in a)e.isFunction(this[l])?this[l](a[l]):this.attr(l,a[l]);return this}return c=t.getElementById(l[2]),c&&(this[0]=c,this.length=1),this}return o.nodeType?(this[0]=o,this.length=1,this):e.isFunction(o)?void 0!==s.ready?s.ready(o):o(e):e.makeArray(o,this)};return o.prototype=e.fn,r=e(t),o}.apply(t,r),!(void 0!==i&&(e.exports=i))},function(e,t,n){var r,i;r=[n(58)],i=function(e){"use strict";return new e}.apply(t,r),!(void 0!==i&&(e.exports=i))},function(e,t,n){var r,i;r=[n(0),n(2),n(14),n(20),n(12),n(110),n(48),n(109),n(27),n(124),n(100),n(13),n(116),n(117),n(17),n(121),n(131),n(15),n(107),n(67),n(11),n(99),n(97),n(94),n(95),n(115),n(25),n(114),n(123),n(112),n(111),n(119),n(120)],i=function(e){"use strict";return e}.apply(t,r),!(void 0!==i&&(e.exports=i))},function(e,t,n){var r;r=function(){"use strict";return/[^\x20\t\r\n\f]+/g}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){"use strict";(function(e){function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=n(18),o=(n.n(i),n(35),function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}()),a=function(){function t(e,n){r(this,t),Object.assign(this,{api:e,requestId:0})}return o(t,[{key:"match",value:function(e){return!1}},{key:"call",value:function(e){var t=this;this.api.loading.show(),this.makeRequest(e.command).then(function(e){var n=e.result?e.result:e;t.api.loading.hide(),t.api.echo(n),t.api.serverInfo()},function(e){var n=e.result?e.result:e;t.api.loading.hide(),t.api.echo(n),t.api.serverInfo()})}},{key:"addslashes",value:function(e){return(e+"").replace(/[\\"']/g,"\\$&").replace(/\u0000/g,"\\0")}},{key:"makeRequest",value:function(t){var n=this;return new Promise(function(r,i){e.ajax({url:n.api.options.endpoint,dataType:"json",type:"post",headers:{"X-CSRF-TOKEN":n.api.options.csrfToken},data:{jsonrpc:"2.0",id:++n.requestId,command:t},success:function(e){return 0!==e.error?void i(e):void r(e)},error:function(e,t,n){i({result:e.status+": "+n})}})})}}]),t}();t.a=a}).call(t,n(6))},function(e,t,n){var r,i;r=[n(0)],i=function(e){"use strict";var t=function(n,r,i,o,a,s,l){var c=0,u=n.length,f=null==i;if("object"===e.type(i)){a=!0;for(c in i)t(n,r,c,i[c],!0,s,l)}else if(void 0!==o&&(a=!0,e.isFunction(o)||(l=!0),f&&(l?(r.call(n,o),r=null):(f=r,r=function(t,n,r){return f.call(e(t),r)})),r))for(;c<u;c++)r(n[c],i,l?o:o.call(n[c],c,r(n[c],i)));return a?n:f?r.call(n):u?r(n[0],i):s};return t}.apply(t,r),!(void 0!==i&&(e.exports=i))},function(e,t,n){var r;r=function(){"use strict";return{}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r,i;r=[n(0),n(1),n(7),n(98),n(44),n(45),n(4),n(96),n(26),n(12),n(67)],i=function(e,t,n,r,i,o){"use strict";function a(t){return function(r,i){"string"!=typeof r&&(i=r,r="*");var o,a=0,s=r.toLowerCase().match(n)||[];if(e.isFunction(i))for(;o=s[a++];)"+"===o[0]?(o=o.slice(1)||"*",(t[o]=t[o]||[]).unshift(i)):(t[o]=t[o]||[]).push(i)}}function s(t,n,r,i){function o(l){var c;return a[l]=!0,e.each(t[l]||[],function(e,t){var l=t(n,r,i);return"string"!=typeof l||s||a[l]?s?!(c=l):void 0:(n.dataTypes.unshift(l),o(l),!1)}),c}var a={},s=t===x;return o(n.dataTypes[0])||!a["*"]&&o("*")}function l(t,n){var r,i,o=e.ajaxSettings.flatOptions||{};for(r in n)void 0!==n[r]&&((o[r]?t:i||(i={}))[r]=n[r]);return i&&e.extend(!0,t,i),t}function c(e,t,n){for(var r,i,o,a,s=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){l.unshift(i);break}if(l[0]in n)o=l[0];else{for(i in n){if(!l[0]||e.converters[i+" "+l[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==l[0]&&l.unshift(o),n[o]}function u(e,t,n,r){var i,o,a,s,l,c={},u=e.dataTypes.slice();if(u[1])for(a in e.converters)c[a.toLowerCase()]=e.converters[a];for(o=u.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!l&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=u.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(a=c[l+" "+o]||c["* "+o],!a)for(i in c)if(s=i.split(" "),s[1]===o&&(a=c[l+" "+s[0]]||c["* "+s[0]])){a===!0?a=c[i]:c[i]!==!0&&(o=s[0],u.unshift(s[1]));break}if(a!==!0)if(a&&e.throws)t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}var f=/%20/g,p=/#.*$/,d=/([?&])_=[^&]*/,h=/^(.*?):[ \t]*([^\r\n]*)$/gm,m=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,g=/^(?:GET|HEAD)$/,v=/^\/\//,y={},x={},b="*/".concat("*"),w=t.createElement("a");return w.href=r.href,e.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:r.href,type:"GET",isLocal:m.test(r.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":b,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":e.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,n){return n?l(l(t,e.ajaxSettings),n):l(e.ajaxSettings,t)},ajaxPrefilter:a(y),ajaxTransport:a(x),ajax:function(a,l){function m(t,n,r,i){var o,a,s,l,f,p=n;M||(M=!0,T&&window.clearTimeout(T),k=void 0,C=i||"",z.readyState=t>0?4:0,o=t>=200&&t<300||304===t,r&&(l=c(E,z,r)),l=u(E,l,z,o),o?(E.ifModified&&(f=z.getResponseHeader("Last-Modified"),f&&(e.lastModified[_]=f),f=z.getResponseHeader("etag"),f&&(e.etag[_]=f)),204===t||"HEAD"===E.type?p="nocontent":304===t?p="notmodified":(p=l.state,a=l.data,s=l.error,o=!s)):(s=p,!t&&p||(p="error",t<0&&(t=0))),z.status=t,z.statusText=(n||p)+"",o?j.resolveWith(D,[a,p,z]):j.rejectWith(D,[z,p,s]),z.statusCode(I),I=void 0,L&&N.trigger(o?"ajaxSuccess":"ajaxError",[z,E,o?a:s]),P.fireWith(D,[z,p]),L&&(N.trigger("ajaxComplete",[z,E]),--e.active||e.event.trigger("ajaxStop")))}"object"==typeof a&&(l=a,a=void 0),l=l||{};var k,_,C,S,T,A,M,L,F,O,E=e.ajaxSetup({},l),D=E.context||E,N=E.context&&(D.nodeType||D.jquery)?e(D):e.event,j=e.Deferred(),P=e.Callbacks("once memory"),I=E.statusCode||{},R={},q={},B="canceled",z={readyState:0,getResponseHeader:function(e){var t;if(M){if(!S)for(S={};t=h.exec(C);)S[t[1].toLowerCase()]=t[2];t=S[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return M?C:null},setRequestHeader:function(e,t){return null==M&&(e=q[e.toLowerCase()]=q[e.toLowerCase()]||e,R[e]=t),this},overrideMimeType:function(e){return null==M&&(E.mimeType=e),this},statusCode:function(e){var t;if(e)if(M)z.always(e[z.status]);else for(t in e)I[t]=[I[t],e[t]];return this},abort:function(e){var t=e||B;return k&&k.abort(t),m(0,t),this}};if(j.promise(z),E.url=((a||E.url||r.href)+"").replace(v,r.protocol+"//"),E.type=l.method||l.type||E.method||E.type,E.dataTypes=(E.dataType||"*").toLowerCase().match(n)||[""],null==E.crossDomain){A=t.createElement("a");try{A.href=E.url,A.href=A.href,E.crossDomain=w.protocol+"//"+w.host!=A.protocol+"//"+A.host}catch(e){E.crossDomain=!0}}if(E.data&&E.processData&&"string"!=typeof E.data&&(E.data=e.param(E.data,E.traditional)),s(y,E,l,z),M)return z;L=e.event&&E.global,L&&0===e.active++&&e.event.trigger("ajaxStart"),E.type=E.type.toUpperCase(),E.hasContent=!g.test(E.type),_=E.url.replace(p,""),E.hasContent?E.data&&E.processData&&0===(E.contentType||"").indexOf("application/x-www-form-urlencoded")&&(E.data=E.data.replace(f,"+")):(O=E.url.slice(_.length),E.data&&(_+=(o.test(_)?"&":"?")+E.data,delete E.data),E.cache===!1&&(_=_.replace(d,"$1"),O=(o.test(_)?"&":"?")+"_="+i++ +O),E.url=_+O),E.ifModified&&(e.lastModified[_]&&z.setRequestHeader("If-Modified-Since",e.lastModified[_]),e.etag[_]&&z.setRequestHeader("If-None-Match",e.etag[_])),(E.data&&E.hasContent&&E.contentType!==!1||l.contentType)&&z.setRequestHeader("Content-Type",E.contentType),z.setRequestHeader("Accept",E.dataTypes[0]&&E.accepts[E.dataTypes[0]]?E.accepts[E.dataTypes[0]]+("*"!==E.dataTypes[0]?", "+b+"; q=0.01":""):E.accepts["*"]);for(F in E.headers)z.setRequestHeader(F,E.headers[F]);if(E.beforeSend&&(E.beforeSend.call(D,z,E)===!1||M))return z.abort();if(B="abort",P.add(E.complete),z.done(E.success),z.fail(E.error),k=s(x,E,l,z)){if(z.readyState=1,L&&N.trigger("ajaxSend",[z,E]),M)return z;E.async&&E.timeout>0&&(T=window.setTimeout(function(){z.abort("timeout")},E.timeout));try{M=!1,k.send(R,m)}catch(e){if(M)throw e;m(-1,e)}}else m(-1,"No Transport");return z},getJSON:function(t,n,r){return e.get(t,n,r,"json")},getScript:function(t,n){return e.get(t,void 0,n,"script")}}),e.each(["get","post"],function(t,n){e[n]=function(t,r,i,o){return e.isFunction(r)&&(o=o||i,i=r,r=void 0),e.ajax(e.extend({url:t,type:n,dataType:o,data:r,success:i},e.isPlainObject(t)&&t))}}),e}.apply(t,r),!(void 0!==i&&(e.exports=i))},function(e,t,n){var r,i;r=[n(0),n(34),n(20)],i=function(e,t){"use strict";function n(e){return e}function r(e){throw e}function i(t,n,r){var i;try{t&&e.isFunction(i=t.promise)?i.call(t).done(n).fail(r):t&&e.isFunction(i=t.then)?i.call(t,n,r):n.call(void 0,t)}catch(e){r.call(void 0,e)}}return e.extend({Deferred:function(t){var i=[["notify","progress",e.Callbacks("memory"),e.Callbacks("memory"),2],["resolve","done",e.Callbacks("once memory"),e.Callbacks("once memory"),0,"resolved"],["reject","fail",e.Callbacks("once memory"),e.Callbacks("once memory"),1,"rejected"]],o="pending",a={state:function(){return o},always:function(){return s.done(arguments).fail(arguments),this},catch:function(e){return a.then(null,e)},pipe:function(){var t=arguments;return e.Deferred(function(n){e.each(i,function(r,i){var o=e.isFunction(t[i[4]])&&t[i[4]];s[i[1]](function(){var t=o&&o.apply(this,arguments);t&&e.isFunction(t.promise)?t.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[i[0]+"With"](this,o?[t]:arguments)})}),t=null}).promise()},then:function(t,o,a){function s(t,i,o,a){return function(){var c=this,u=arguments,f=function(){var f,p;if(!(t<l)){if(f=o.apply(c,u),f===i.promise())throw new TypeError("Thenable self-resolution");p=f&&("object"==typeof f||"function"==typeof f)&&f.then,e.isFunction(p)?a?p.call(f,s(l,i,n,a),s(l,i,r,a)):(l++,p.call(f,s(l,i,n,a),s(l,i,r,a),s(l,i,n,i.notifyWith))):(o!==n&&(c=void 0,u=[f]),(a||i.resolveWith)(c,u))}},p=a?f:function(){try{f()}catch(n){e.Deferred.exceptionHook&&e.Deferred.exceptionHook(n,p.stackTrace),t+1>=l&&(o!==r&&(c=void 0,u=[n]),i.rejectWith(c,u))}};t?p():(e.Deferred.getStackHook&&(p.stackTrace=e.Deferred.getStackHook()),window.setTimeout(p))}}var l=0;return e.Deferred(function(l){i[0][3].add(s(0,l,e.isFunction(a)?a:n,l.notifyWith)),i[1][3].add(s(0,l,e.isFunction(t)?t:n)),i[2][3].add(s(0,l,e.isFunction(o)?o:r))}).promise()},promise:function(t){return null!=t?e.extend(t,a):a}},s={};return e.each(i,function(e,t){var n=t[2],r=t[5];a[t[1]]=n.add,r&&n.add(function(){o=r},i[3-e][2].disable,i[0][2].lock),n.add(t[3].fire),s[t[0]]=function(){return s[t[0]+"With"](this===s?void 0:this,arguments),this},s[t[0]+"With"]=n.fireWith}),a.promise(s),t&&t.call(s,s),s},when:function(n){var r=arguments.length,o=r,a=Array(o),s=t.call(arguments),l=e.Deferred(),c=function(e){return function(n){a[e]=this,s[e]=arguments.length>1?t.call(arguments):n,--r||l.resolveWith(a,s)}};if(r<=1&&(i(n,l.done(c(o)).resolve,l.reject),"pending"===l.state()||e.isFunction(s[o]&&s[o].then)))return l.then();for(;o--;)i(s[o],c(o),l.reject);return l.promise()}}),e}.apply(t,r),!(void 0!==i&&(e.exports=i))},function(e,t,n){var r,i;r=[n(0),n(1),n(29),n(7),n(34),n(5),n(4),n(2)],i=function(e,t,n,r,i,o){"use strict";function a(){return!0}function s(){return!1}function l(){try{return t.activeElement}catch(e){}}function c(t,n,r,i,o,a){var l,u;if("object"==typeof n){"string"!=typeof r&&(i=i||r,r=void 0);for(u in n)c(t,u,r,i,n[u],a);return t}if(null==i&&null==o?(o=r,i=r=void 0):null==o&&("string"==typeof r?(o=i,i=void 0):(o=i,i=r,r=void 0)),o===!1)o=s;else if(!o)return t;return 1===a&&(l=o,o=function(t){return e().off(t),l.apply(this,arguments)},o.guid=l.guid||(l.guid=e.guid++)),t.each(function(){e.event.add(this,n,o,i,r)})}var u=/^key/,f=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,p=/^([^.]*)(?:\.(.+)|)/;return e.event={global:{},add:function(t,i,a,s,l){var c,u,f,d,h,m,g,v,y,x,b,w=o.get(t);if(w)for(a.handler&&(c=a,a=c.handler,l=c.selector),l&&e.find.matchesSelector(n,l),a.guid||(a.guid=e.guid++),(d=w.events)||(d=w.events={}),(u=w.handle)||(u=w.handle=function(n){return"undefined"!=typeof e&&e.event.triggered!==n.type?e.event.dispatch.apply(t,arguments):void 0}),i=(i||"").match(r)||[""],h=i.length;h--;)f=p.exec(i[h])||[],y=b=f[1],x=(f[2]||"").split(".").sort(),y&&(g=e.event.special[y]||{},y=(l?g.delegateType:g.bindType)||y,g=e.event.special[y]||{},m=e.extend({type:y,origType:b,data:s,handler:a,guid:a.guid,selector:l,needsContext:l&&e.expr.match.needsContext.test(l),namespace:x.join(".")},c),(v=d[y])||(v=d[y]=[],v.delegateCount=0,g.setup&&g.setup.call(t,s,x,u)!==!1||t.addEventListener&&t.addEventListener(y,u)),g.add&&(g.add.call(t,m),m.handler.guid||(m.handler.guid=a.guid)),l?v.splice(v.delegateCount++,0,m):v.push(m),e.event.global[y]=!0)},remove:function(t,n,i,a,s){var l,c,u,f,d,h,m,g,v,y,x,b=o.hasData(t)&&o.get(t);if(b&&(f=b.events)){for(n=(n||"").match(r)||[""],d=n.length;d--;)if(u=p.exec(n[d])||[],v=x=u[1],y=(u[2]||"").split(".").sort(),v){for(m=e.event.special[v]||{},v=(a?m.delegateType:m.bindType)||v,g=f[v]||[],u=u[2]&&new RegExp("(^|\\.)"+y.join("\\.(?:.*\\.|)")+"(\\.|$)"),c=l=g.length;l--;)h=g[l],!s&&x!==h.origType||i&&i.guid!==h.guid||u&&!u.test(h.namespace)||a&&a!==h.selector&&("**"!==a||!h.selector)||(g.splice(l,1),h.selector&&g.delegateCount--,m.remove&&m.remove.call(t,h));c&&!g.length&&(m.teardown&&m.teardown.call(t,y,b.handle)!==!1||e.removeEvent(t,v,b.handle),delete f[v])}else for(v in f)e.event.remove(t,v+n[d],i,a,!0);e.isEmptyObject(f)&&o.remove(t,"handle events")}},dispatch:function(t){var n,r,i,a,s,l,c=e.event.fix(t),u=new Array(arguments.length),f=(o.get(this,"events")||{})[c.type]||[],p=e.event.special[c.type]||{};for(u[0]=c,n=1;n<arguments.length;n++)u[n]=arguments[n];if(c.delegateTarget=this,!p.preDispatch||p.preDispatch.call(this,c)!==!1){for(l=e.event.handlers.call(this,c,f),n=0;(a=l[n++])&&!c.isPropagationStopped();)for(c.currentTarget=a.elem,r=0;(s=a.handlers[r++])&&!c.isImmediatePropagationStopped();)c.rnamespace&&!c.rnamespace.test(s.namespace)||(c.handleObj=s,c.data=s.data,i=((e.event.special[s.origType]||{}).handle||s.handler).apply(a.elem,u),void 0!==i&&(c.result=i)===!1&&(c.preventDefault(),c.stopPropagation()));return p.postDispatch&&p.postDispatch.call(this,c),c.result}},handlers:function(t,n){var r,i,o,a,s,l=[],c=n.delegateCount,u=t.target;if(c&&u.nodeType&&!("click"===t.type&&t.button>=1))for(;u!==this;u=u.parentNode||this)if(1===u.nodeType&&("click"!==t.type||u.disabled!==!0)){for(a=[],s={},r=0;r<c;r++)i=n[r],o=i.selector+" ",void 0===s[o]&&(s[o]=i.needsContext?e(o,this).index(u)>-1:e.find(o,this,null,[u]).length),s[o]&&a.push(i);a.length&&l.push({elem:u,handlers:a})}return u=this,c<n.length&&l.push({elem:u,handlers:n.slice(c)}),l},addProp:function(t,n){Object.defineProperty(e.Event.prototype,t,{enumerable:!0,configurable:!0,get:e.isFunction(n)?function(){if(this.originalEvent)return n(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(t){return t[e.expando]?t:new e.Event(t)},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==l()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===l()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&e.nodeName(this,"input"))return this.click(),!1},_default:function(t){return e.nodeName(t.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},e.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},e.Event=function(t,n){return this instanceof e.Event?(t&&t.type?(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented||void 0===t.defaultPrevented&&t.returnValue===!1?a:s,this.target=t.target&&3===t.target.nodeType?t.target.parentNode:t.target,this.currentTarget=t.currentTarget,this.relatedTarget=t.relatedTarget):this.type=t,n&&e.extend(this,n),this.timeStamp=t&&t.timeStamp||e.now(),void(this[e.expando]=!0)):new e.Event(t,n)},e.Event.prototype={constructor:e.Event,isDefaultPrevented:s,isPropagationStopped:s,isImmediatePropagationStopped:s,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=a,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=a,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=a,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},e.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(e){var t=e.button;return null==e.which&&u.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&f.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},e.event.addProp),e.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(t,n){e.event.special[t]={delegateType:n,bindType:n,handle:function(t){var r,i=this,o=t.relatedTarget,a=t.handleObj;return o&&(o===i||e.contains(i,o))||(t.type=a.origType,r=a.handler.apply(this,arguments),t.type=n),r}}}),e.fn.extend({on:function(e,t,n,r){return c(this,e,t,n,r)},one:function(e,t,n,r){return c(this,e,t,n,r,1)},off:function(t,n,r){var i,o;if(t&&t.preventDefault&&t.handleObj)return i=t.handleObj,e(t.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof t){for(o in t)this.off(o,n,t[o]);return this}return n!==!1&&"function"!=typeof n||(r=n,n=void 0),r===!1&&(r=s),this.each(function(){e.event.remove(this,t,r,n)})}}),e}.apply(t,r),!(void 0!==i&&(e.exports=i))},function(e,t,n){var r,i;r=[n(0),n(31),n(126),n(127),n(69),n(4),n(68),n(2)],i=function(e,t,n,r,i){"use strict";function o(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}var a=/^(?:parents|prev(?:Until|All))/,s={children:!0,contents:!0,next:!0,prev:!0};return e.fn.extend({has:function(t){var n=e(t,this),r=n.length;return this.filter(function(){for(var t=0;t<r;t++)if(e.contains(this,n[t]))return!0})},closest:function(t,n){var r,o=0,a=this.length,s=[],l="string"!=typeof t&&e(t);if(!i.test(t))for(;o<a;o++)for(r=this[o];r&&r!==n;r=r.parentNode)if(r.nodeType<11&&(l?l.index(r)>-1:1===r.nodeType&&e.find.matchesSelector(r,t))){s.push(r);break}return this.pushStack(s.length>1?e.uniqueSort(s):s)},index:function(n){return n?"string"==typeof n?t.call(e(n),this[0]):t.call(this,n.jquery?n[0]:n):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,n){return this.pushStack(e.uniqueSort(e.merge(this.get(),e(t,n))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),e.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return n(e,"parentNode")},parentsUntil:function(e,t,r){return n(e,"parentNode",r)},next:function(e){return o(e,"nextSibling")},prev:function(e){return o(e,"previousSibling")},nextAll:function(e){return n(e,"nextSibling")},prevAll:function(e){return n(e,"previousSibling")},nextUntil:function(e,t,r){return n(e,"nextSibling",r)},prevUntil:function(e,t,r){return n(e,"previousSibling",r)},siblings:function(e){return r((e.parentNode||{}).firstChild,e)},children:function(e){return r(e.firstChild)},contents:function(t){return t.contentDocument||e.merge([],t.childNodes)}},function(t,n){e.fn[t]=function(r,i){var o=e.map(this,n,r);return"Until"!==t.slice(-5)&&(i=r),i&&"string"==typeof i&&(o=e.filter(i,o)),this.length>1&&(s[t]||e.uniqueSort(o),a.test(t)&&o.reverse()),this.pushStack(o)}}),e}.apply(t,r),!(void 0!==i&&(e.exports=i))},function(e,t,n){var r,i;r=[n(0),n(32),n(9),n(56),n(1),n(33),n(23),n(53),n(54),n(57),n(52),n(51),n(50),n(22),n(4),n(48),n(2)],i=function(e,t,n,r,i,o,a,s,l,c,u,f,p,d){"use strict";function h(e){if(e in k)return e;for(var t=e[0].toUpperCase()+e.slice(1),n=w.length;n--;)if(e=w[n]+t,e in k)return e}function m(e,t,n){var r=o.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function g(t,n,r,i,o){var a,l=0;for(a=r===(i?"border":"content")?4:"width"===n?1:0;a<4;a+=2)"margin"===r&&(l+=e.css(t,r+s[a],!0,o)),i?("content"===r&&(l-=e.css(t,"padding"+s[a],!0,o)),"margin"!==r&&(l-=e.css(t,"border"+s[a]+"Width",!0,o))):(l+=e.css(t,"padding"+s[a],!0,o),"padding"!==r&&(l+=e.css(t,"border"+s[a]+"Width",!0,o)));return l}function v(t,n,r){var i,o=!0,s=l(t),c="border-box"===e.css(t,"boxSizing",!1,s);if(t.getClientRects().length&&(i=t.getBoundingClientRect()[n]),i<=0||null==i){if(i=u(t,n,s),(i<0||null==i)&&(i=t.style[n]),a.test(i))return i;o=c&&(d.boxSizingReliable()||i===t.style[n]),i=parseFloat(i)||0}return i+g(t,n,r||(c?"border":"content"),o,s)+"px"}var y=/^(none|table(?!-c[ea]).+)/,x={position:"absolute",visibility:"hidden",display:"block"},b={letterSpacing:"0",fontWeight:"400"},w=["Webkit","Moz","ms"],k=i.createElement("div").style;return e.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=u(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:"cssFloat"},style:function(t,n,r,i){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var a,s,l,c=e.camelCase(n),u=t.style;return n=e.cssProps[c]||(e.cssProps[c]=h(c)||c),l=e.cssHooks[n]||e.cssHooks[c],void 0===r?l&&"get"in l&&void 0!==(a=l.get(t,!1,i))?a:u[n]:(s=typeof r,"string"===s&&(a=o.exec(r))&&a[1]&&(r=f(t,n,a),s="number"),null!=r&&r===r&&("number"===s&&(r+=a&&a[3]||(e.cssNumber[c]?"":"px")),d.clearCloneStyle||""!==r||0!==n.indexOf("background")||(u[n]="inherit"),l&&"set"in l&&void 0===(r=l.set(t,r,i))||(u[n]=r)),void 0)}},css:function(t,n,r,i){var o,a,s,l=e.camelCase(n);return n=e.cssProps[l]||(e.cssProps[l]=h(l)||l),s=e.cssHooks[n]||e.cssHooks[l],s&&"get"in s&&(o=s.get(t,!0,r)),void 0===o&&(o=u(t,n,i)),"normal"===o&&n in b&&(o=b[n]),""===r||r?(a=parseFloat(o),r===!0||isFinite(a)?a||0:o):o}}),e.each(["height","width"],function(t,n){e.cssHooks[n]={get:function(t,r,i){if(r)return!y.test(e.css(t,"display"))||t.getClientRects().length&&t.getBoundingClientRect().width?v(t,n,i):c(t,x,function(){return v(t,n,i)})},set:function(t,r,i){var a,s=i&&l(t),c=i&&g(t,n,i,"border-box"===e.css(t,"boxSizing",!1,s),s);return c&&(a=o.exec(r))&&"px"!==(a[3]||"px")&&(t.style[n]=r,r=e.css(t,n)),m(t,r,c)}}}),e.cssHooks.marginLeft=p(d.reliableMarginLeft,function(e,t){if(t)return(parseFloat(u(e,"marginLeft"))||e.getBoundingClientRect().left-c(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),e.each({margin:"",padding:"",border:"Width"},function(t,n){e.cssHooks[t+n]={expand:function(e){for(var r=0,i={},o="string"==typeof e?e.split(" "):[e];r<4;r++)i[t+s[r]+n]=o[r]||o[r-2]||o[0];return i}},r.test(t)||(e.cssHooks[t+n].set=m)}),e.fn.extend({css:function(t,r){return n(this,function(t,n,r){var i,o,a={},s=0;if(e.isArray(n)){for(i=l(t),o=n.length;s<o;s++)a[n[s]]=e.css(t,n[s],!1,i);return a}return void 0!==r?e.style(t,n,r):e.css(t,n)},t,r,arguments.length>1)}}),e}.apply(t,r),!(void 0!==i&&(e.exports=i))},function(e,t,n){var r;r=function(){"use strict";return[]}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r,i;r=[n(0),n(70),n(72),n(9),n(63),n(65),n(64),n(66),n(61),n(62),n(60),n(122),n(5),n(59),n(24),n(47),n(4),n(14),n(2),n(13)],i=function(e,t,n,r,i,o,a,s,l,c,u,f,p,d,h,m){"use strict";function g(t,n){return e.nodeName(t,"table")&&e.nodeName(11!==n.nodeType?n:n.firstChild,"tr")?t.getElementsByTagName("tbody")[0]||t:t}function v(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function y(e){var t=T.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function x(t,n){var r,i,o,a,s,l,c,u;if(1===n.nodeType){if(p.hasData(t)&&(a=p.access(t),s=p.set(n,a),u=a.events)){delete s.handle,s.events={};for(o in u)for(r=0,i=u[o].length;r<i;r++)e.event.add(n,o,u[o][r])}d.hasData(t)&&(l=d.access(t),c=e.extend({},l),d.set(n,c))}}function b(e,t){var n=t.nodeName.toLowerCase();"input"===n&&i.test(e.type)?t.checked=e.checked:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}function w(n,r,i,o){r=t.apply([],r);var s,c,d,h,g,x,b=0,k=n.length,_=k-1,C=r[0],T=e.isFunction(C);if(T||k>1&&"string"==typeof C&&!f.checkClone&&S.test(C))return n.each(function(e){var t=n.eq(e);T&&(r[0]=C.call(this,e,t.html())),w(t,r,i,o)});if(k&&(s=u(r,n[0].ownerDocument,!1,n,o),c=s.firstChild,1===s.childNodes.length&&(s=c),c||o)){for(d=e.map(l(s,"script"),v),h=d.length;b<k;b++)g=s,b!==_&&(g=e.clone(g,!0,!0),h&&e.merge(d,l(g,"script"))),i.call(n[b],g,b);if(h)for(x=d[d.length-1].ownerDocument,e.map(d,y),b=0;b<h;b++)g=d[b],a.test(g.type||"")&&!p.access(g,"globalEval")&&e.contains(x,g)&&(g.src?e._evalUrl&&e._evalUrl(g.src):m(g.textContent.replace(A,""),x))}return n}function k(t,n,r){for(var i,o=n?e.filter(n,t):t,a=0;null!=(i=o[a]);a++)r||1!==i.nodeType||e.cleanData(l(i)),i.parentNode&&(r&&e.contains(i.ownerDocument,i)&&c(l(i,"script")),i.parentNode.removeChild(i));return t}var _=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,C=/<script|<style|<link/i,S=/checked\s*(?:[^=]|=\s*.checked.)/i,T=/^true\/(.*)/,A=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;return e.extend({htmlPrefilter:function(e){return e.replace(_,"<$1></$2>")},clone:function(t,n,r){var i,o,a,s,u=t.cloneNode(!0),p=e.contains(t.ownerDocument,t);if(!(f.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||e.isXMLDoc(t)))for(s=l(u),a=l(t),i=0,o=a.length;i<o;i++)b(a[i],s[i]);if(n)if(r)for(a=a||l(t),s=s||l(u),i=0,o=a.length;i<o;i++)x(a[i],s[i]);else x(t,u);return s=l(u,"script"),s.length>0&&c(s,!p&&l(t,"script")),u},cleanData:function(t){for(var n,r,i,o=e.event.special,a=0;void 0!==(r=t[a]);a++)if(h(r)){if(n=r[p.expando]){if(n.events)for(i in n.events)o[i]?e.event.remove(r,i):e.removeEvent(r,i,n.handle);r[p.expando]=void 0}r[d.expando]&&(r[d.expando]=void 0)}}}),e.fn.extend({detach:function(e){return k(this,e,!0)},remove:function(e){return k(this,e)},text:function(t){return r(this,function(t){return void 0===t?e.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=t)})},null,t,arguments.length)},append:function(){return w(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=g(this,e);t.appendChild(e)}})},prepend:function(){return w(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=g(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return w(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return w(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var t,n=0;null!=(t=this[n]);n++)1===t.nodeType&&(e.cleanData(l(t,!1)),t.textContent="");return this},clone:function(t,n){return t=null!=t&&t,n=null==n?t:n,this.map(function(){return e.clone(this,t,n)})},html:function(t){return r(this,function(t){var n=this[0]||{},r=0,i=this.length;if(void 0===t&&1===n.nodeType)return n.innerHTML;if("string"==typeof t&&!C.test(t)&&!s[(o.exec(t)||["",""])[1].toLowerCase()]){t=e.htmlPrefilter(t);try{for(;r<i;r++)n=this[r]||{},1===n.nodeType&&(e.cleanData(l(n,!1)),n.innerHTML=t);n=0}catch(e){}}n&&this.empty().append(t)},null,t,arguments.length)},replaceWith:function(){var t=[];return w(this,arguments,function(n){var r=this.parentNode;e.inArray(this,t)<0&&(e.cleanData(l(this)),r&&r.replaceChild(n,this))},t)}}),e.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"
0 ignored issues
show
introduced by
The for loop does not have a body. Maybe you have misplaced a semicolon. If you do wish to have a loop without a body, use an empty body {}.
Loading history...
Best Practice introduced by
There is no return statement in this branch, but you do return something in other branches. Did you maybe miss it? If you do not want to return anything, consider adding return undefined; explicitly.
Loading history...
Complexity Best Practice introduced by
There is no return statement if r is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Coding Style Best Practice introduced by
By convention, constructors like e should be capitalized.
Loading history...
Bug introduced by
The variable r seems to not be initialized for all possible execution paths.
Loading history...
Bug introduced by
The variable i seems to not be initialized for all possible execution paths.
Loading history...
Complexity Best Practice introduced by
There is no return statement if this.originalEvent is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Bug introduced by
The variable c does not seem to be initialized in case w on line 6 is true. Are you sure the function extend handles undefined variables?
Loading history...
Complexity Best Practice introduced by
There is no return statement if t && 3 !== t.nodeType &&...= t.nodeType && t.style is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Complexity Best Practice introduced by
There is no return statement if c.delegateTarget = this,...ch.call(this, c) !== !1 is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Bug introduced by
The variable t does not seem to be initialized in case M on line 6 is false. Are you sure this can never be the case?
Loading history...
Comprehensibility introduced by
Usage of the sequence operator is discouraged, since it may lead to obfuscated code.

The sequence or comma operator allows the inclusion of multiple expressions where only is permitted. The result of the sequence is the value of the last expression.

This operator is most often used in for statements.

Used in another places it can make code hard to read, especially when people do not realize it even exists as a seperate operator.

This check looks for usage of the sequence operator in locations where it is not necessary and could be replaced by a series of expressions or statements.

var a,b,c;

a = 1, b = 1,  c= 3;

could just as well be written as:

var a,b,c;

a = 1;
b = 1;
c = 3;

To learn more about the sequence operator, please refer to the MDN.

Loading history...
Complexity Best Practice introduced by
There is no return statement if "checkbox" === this.type...nodeName(this, "input") is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Unused Code introduced by
The parameter e is not used and could be removed.

This check looks for parameters in functions that are not used in the function body and are not followed by other parameters which are used inside the function.

Loading history...
Complexity Best Practice introduced by
There is no return statement if this === l() && this.blur is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Bug introduced by
The variable e does not seem to be initialized in case j.promise(z), E.url = a ..., null == E.crossDomain on line 6 is false. Are you sure this can never be the case?
Loading history...
Bug introduced by
The variable d does not seem to be initialized in case ia && d = window.scrollY...a && ra >= 9 && t(), xa on line 6 is false. Are you sure the function scrollTo handles undefined variables?
Loading history...
Complexity Best Practice introduced by
There is no return statement if o is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Coding Style introduced by
Consider using undefined instead of void(0). It is equivalent and more straightforward to read.
Loading history...
Complexity Best Practice introduced by
There is no return statement if t is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Bug introduced by
The variable i does not seem to be initialized in case t.getClientRects().lengt....n, i <= 0 || null == i on line 6 is false. Are you sure this can never be the case?
Loading history...
Bug introduced by
The variable l seems to not be initialized for all possible execution paths. Are you sure u handles undefined variables?
Loading history...
Unused Code introduced by
The parameter n is not used and could be removed.

This check looks for parameters in functions that are not used in the function body and are not followed by other parameters which are used inside the function.

Loading history...
Bug introduced by
The variable s seems to not be initialized for all possible execution paths.
Loading history...
Bug introduced by
The variable e seems to be never initialized.
Loading history...
Bug introduced by
The variable o seems to not be initialized for all possible execution paths.
Loading history...
introduced by
You have used a bitwise operator & in a condition. Did you maybe want to use the logical operator &&
Loading history...
Complexity Best Practice introduced by
There is no return statement if this !== l() && this.focus is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Coding Style Best Practice introduced by
Curly braces around statements make for more readable code and help prevent bugs when you add further statements.

Consider adding curly braces around all statements when they are executed conditionally. This is optional if there is only one statement, but leaving them out can lead to unexpected behaviour if another statement is added later.

Consider:

if (a > 0)
    b = 42;

If you or someone else later decides to put another statement in, only the first statement will be executed.

if (a > 0)
    console.log("a > 0");
    b = 42;

In this case the statement b = 42 will always be executed, while the logging statement will be executed conditionally.

if (a > 0) {
    console.log("a > 0");
    b = 42;
}

ensures that the proper code will be executed conditionally no matter how many statements are added or removed.

Loading history...
Coding Style Comprehensibility Best Practice introduced by
Empty catch clauses should be used with caution; consider adding a comment why this is needed.
Loading history...
Bug introduced by
The variable a seems to not be initialized for all possible execution paths.
Loading history...
7
},function(t,r){e.fn[t]=function(t){for(var i,o=[],a=e(t),s=a.length-1,l=0;l<=s;l++)i=l===s?this:this.clone(!0),e(a[l])[r](i),n.apply(o,i.get());return this.pushStack(o)}}),e}.apply(t,r),!(void 0!==i&&(e.exports=i))},function(e,t,n){"use strict";var r=window.jQuery?window.jQuery:n(6);r.migrateMute=!0;window.jQuery=window.$=r},function(e,t,n){var r,i;r=[n(1),n(10)],i=function(e,t){"use strict";return function(){var n=e.createElement("input"),r=e.createElement("select"),i=r.appendChild(e.createElement("option"));n.type="checkbox",t.checkOn=""!==n.value,t.optSelected=i.selected,n=e.createElement("input"),n.value="t",n.type="radio",t.radioValue="t"===n.value}(),t}.apply(t,r),!(void 0!==i&&(e.exports=i))},function(e,t,n){var r,i;r=[n(0),n(7)],i=function(e,t){"use strict";function n(n){var r={};return e.each(n.match(t)||[],function(e,t){r[t]=!0}),r}return e.Callbacks=function(t){t="string"==typeof t?n(t):e.extend({},t);var r,i,o,a,s=[],l=[],c=-1,u=function(){for(a=t.once,o=r=!0;l.length;c=-1)for(i=l.shift();++c<s.length;)s[c].apply(i[0],i[1])===!1&&t.stopOnFalse&&(c=s.length,i=!1);t.memory||(i=!1),r=!1,a&&(s=i?[]:"")},f={add:function(){return s&&(i&&!r&&(c=s.length-1,l.push(i)),function n(r){e.each(r,function(r,i){e.isFunction(i)?t.unique&&f.has(i)||s.push(i):i&&i.length&&"string"!==e.type(i)&&n(i)})}(arguments),i&&!r&&u()),this},remove:function(){return e.each(arguments,function(t,n){for(var r;(r=e.inArray(n,s,r))>-1;)s.splice(r,1),r<=c&&c--}),this},has:function(t){return t?e.inArray(t,s)>-1:s.length>0},empty:function(){return s&&(s=[]),this},disable:function(){return a=l=[],s=i="",this},disabled:function(){return!s},lock:function(){return a=l=[],i||r||(s=i=""),this},locked:function(){return!!a},fireWith:function(e,t){return a||(t=t||[],t=[e,t.slice?t.slice():t],l.push(t),r||u()),this},fire:function(){return f.fireWith(this,arguments),this},fired:function(){return!!o}};return f},e}.apply(t,r),!(void 0!==i&&(e.exports=i))},function(e,t,n){var r,i;r=[n(7)],i=function(e){"use strict";function t(t){var n=t.match(e)||[];return n.join(" ")}return t}.apply(t,r),!(void 0!==i&&(e.exports=i))},function(e,t,n){var r,i;r=[n(0),n(1),n(29),n(10)],i=function(e,t,n,r){"use strict";return function(){function i(){if(u){u.style.cssText="box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",u.innerHTML="",n.appendChild(c);var e=window.getComputedStyle(u);o="1%"!==e.top,l="2px"===e.marginLeft,a="4px"===e.width,u.style.marginRight="50%",s="4px"===e.marginRight,n.removeChild(c),u=null}}var o,a,s,l,c=t.createElement("div"),u=t.createElement("div");u.style&&(u.style.backgroundClip="content-box",u.cloneNode(!0).style.backgroundClip="",r.clearCloneStyle="content-box"===u.style.backgroundClip,c.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",c.appendChild(u),e.extend(r,{pixelPosition:function(){return i(),o},boxSizingReliable:function(){return i(),a},pixelMarginRight:function(){return i(),s},reliableMarginLeft:function(){return i(),l}}))}(),r}.apply(t,r),!(void 0!==i&&(e.exports=i))},function(e,t,n){var r,i;r=[n(32)],i=function(e){"use strict";return new RegExp("^("+e+")(?!px)[a-z%]+$","i")}.apply(t,r),!(void 0!==i&&(e.exports=i))},function(e,t,n){var r;r=function(){"use strict";return function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r,i;r=[n(0),n(1),n(33),n(7),n(53),n(55),n(57),n(51),n(5),n(108),n(4),n(27),n(12),n(14),n(17),n(15),n(113)],i=function(e,t,n,r,i,o,a,s,l,c){"use strict";function u(){y&&(window.requestAnimationFrame(u),e.fx.tick())}function f(){return window.setTimeout(function(){v=void 0}),v=e.now()}function p(e,t){var n,r=0,o={height:e};for(t=t?1:0;r<4;r+=2-t)n=i[r],o["margin"+n]=o["padding"+n]=e;return t&&(o.opacity=o.width=e),o}function d(e,t,n){for(var r,i=(g.tweeners[t]||[]).concat(g.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function h(t,n,r){var i,a,s,u,f,p,h,m,g="width"in n||"height"in n,v=this,y={},b=t.style,w=t.nodeType&&o(t),k=l.get(t,"fxshow");r.queue||(u=e._queueHooks(t,"fx"),null==u.unqueued&&(u.unqueued=0,f=u.empty.fire,u.empty.fire=function(){u.unqueued||f()}),u.unqueued++,v.always(function(){v.always(function(){u.unqueued--,e.queue(t,"fx").length||u.empty.fire()})}));for(i in n)if(a=n[i],x.test(a)){if(delete n[i],s=s||"toggle"===a,a===(w?"hide":"show")){if("show"!==a||!k||void 0===k[i])continue;w=!0}y[i]=k&&k[i]||e.style(t,i)}if(p=!e.isEmptyObject(n),p||!e.isEmptyObject(y)){g&&1===t.nodeType&&(r.overflow=[b.overflow,b.overflowX,b.overflowY],h=k&&k.display,null==h&&(h=l.get(t,"display")),m=e.css(t,"display"),"none"===m&&(h?m=h:(c([t],!0),h=t.style.display||h,m=e.css(t,"display"),c([t]))),("inline"===m||"inline-block"===m&&null!=h)&&"none"===e.css(t,"float")&&(p||(v.done(function(){b.display=h}),null==h&&(m=b.display,h="none"===m?"":m)),b.display="inline-block")),r.overflow&&(b.overflow="hidden",v.always(function(){b.overflow=r.overflow[0],b.overflowX=r.overflow[1],b.overflowY=r.overflow[2]})),p=!1;for(i in y)p||(k?"hidden"in k&&(w=k.hidden):k=l.access(t,"fxshow",{display:h}),s&&(k.hidden=!w),w&&c([t],!0),v.done(function(){w||c([t]),l.remove(t,"fxshow");for(i in y)e.style(t,i,y[i])})),p=d(w?k[i]:0,i,v),i in k||(k[i]=p.start,w&&(p.end=p.start,p.start=0))}}function m(t,n){var r,i,o,a,s;for(r in t)if(i=e.camelCase(r),o=n[i],a=t[r],e.isArray(a)&&(o=a[1],a=t[r]=a[0]),r!==i&&(t[i]=a,delete t[r]),s=e.cssHooks[i],s&&"expand"in s){a=s.expand(a),delete t[i];for(r in a)r in t||(t[r]=a[r],n[r]=o)}else n[i]=o}function g(t,n,r){var i,o,a=0,s=g.prefilters.length,l=e.Deferred().always(function(){delete c.elem}),c=function(){if(o)return!1;for(var e=v||f(),n=Math.max(0,u.startTime+u.duration-e),r=n/u.duration||0,i=1-r,a=0,s=u.tweens.length;a<s;a++)u.tweens[a].run(i);return l.notifyWith(t,[u,i,n]),i<1&&s?n:(l.resolveWith(t,[u]),!1)},u=l.promise({elem:t,props:e.extend({},n),opts:e.extend(!0,{specialEasing:{},easing:e.easing._default},r),originalProperties:n,originalOptions:r,startTime:v||f(),duration:r.duration,tweens:[],createTween:function(n,r){var i=e.Tween(t,u.opts,n,r,u.opts.specialEasing[n]||u.opts.easing);return u.tweens.push(i),i},stop:function(e){var n=0,r=e?u.tweens.length:0;if(o)return this;for(o=!0;n<r;n++)u.tweens[n].run(1);return e?(l.notifyWith(t,[u,1,0]),l.resolveWith(t,[u,e])):l.rejectWith(t,[u,e]),this}}),p=u.props;for(m(p,u.opts.specialEasing);a<s;a++)if(i=g.prefilters[a].call(u,t,p,u.opts))return e.isFunction(i.stop)&&(e._queueHooks(u.elem,u.opts.queue).stop=e.proxy(i.stop,i)),i;return e.map(p,d,u),e.isFunction(u.opts.start)&&u.opts.start.call(t,u),e.fx.timer(e.extend(c,{elem:t,anim:u,queue:u.opts.queue})),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always)}var v,y,x=/^(?:toggle|show|hide)$/,b=/queueHooks$/;return e.Animation=e.extend(g,{tweeners:{"*":[function(e,t){var r=this.createTween(e,t);return s(r.elem,e,n.exec(t),r),r}]},tweener:function(t,n){e.isFunction(t)?(n=t,t=["*"]):t=t.match(r);for(var i,o=0,a=t.length;o<a;o++)i=t[o],g.tweeners[i]=g.tweeners[i]||[],g.tweeners[i].unshift(n)},prefilters:[h],prefilter:function(e,t){t?g.prefilters.unshift(e):g.prefilters.push(e)}}),e.speed=function(n,r,i){var o=n&&"object"==typeof n?e.extend({},n):{complete:i||!i&&r||e.isFunction(n)&&n,duration:n,easing:i&&r||r&&!e.isFunction(r)&&r};return e.fx.off||t.hidden?o.duration=0:"number"!=typeof o.duration&&(o.duration in e.fx.speeds?o.duration=e.fx.speeds[o.duration]:o.duration=e.fx.speeds._default),null!=o.queue&&o.queue!==!0||(o.queue="fx"),o.old=o.complete,o.complete=function(){e.isFunction(o.old)&&o.old.call(this),o.queue&&e.dequeue(this,o.queue)},o},e.fn.extend({fadeTo:function(e,t,n,r){return this.filter(o).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(t,n,r,i){var o=e.isEmptyObject(t),a=e.speed(n,r,i),s=function(){var n=g(this,e.extend({},t),a);(o||l.get(this,"finish"))&&n.stop(!0)};return s.finish=s,o||a.queue===!1?this.each(s):this.queue(a.queue,s)},stop:function(t,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return"string"!=typeof t&&(r=n,n=t,t=void 0),n&&t!==!1&&this.queue(t||"fx",[]),this.each(function(){var n=!0,o=null!=t&&t+"queueHooks",a=e.timers,s=l.get(this);if(o)s[o]&&s[o].stop&&i(s[o]);else for(o in s)s[o]&&s[o].stop&&b.test(o)&&i(s[o]);for(o=a.length;o--;)a[o].elem!==this||null!=t&&a[o].queue!==t||(a[o].anim.stop(r),n=!1,a.splice(o,1));!n&&r||e.dequeue(this,t)})},finish:function(t){return t!==!1&&(t=t||"fx"),this.each(function(){var n,r=l.get(this),i=r[t+"queue"],o=r[t+"queueHooks"],a=e.timers,s=i?i.length:0;for(r.finish=!0,e.queue(this,t,[]),o&&o.stop&&o.stop.call(this,!0),n=a.length;n--;)a[n].elem===this&&a[n].queue===t&&(a[n].anim.stop(!0),a.splice(n,1));for(n=0;n<s;n++)i[n]&&i[n].finish&&i[n].finish.call(this);delete r.finish})}}),e.each(["toggle","show","hide"],function(t,n){var r=e.fn[n];e.fn[n]=function(e,t,i){return null==e||"boolean"==typeof e?r.apply(this,arguments):this.animate(p(n,!0),e,t,i)}}),e.each({slideDown:p("show"),slideUp:p("hide"),slideToggle:p("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(t,n){e.fn[t]=function(e,t,r){return this.animate(n,e,t,r)}}),e.timers=[],e.fx.tick=function(){var t,n=0,r=e.timers;for(v=e.now();n<r.length;n++)t=r[n],t()||r[n]!==t||r.splice(n--,1);r.length||e.fx.stop(),v=void 0},e.fx.timer=function(t){e.timers.push(t),t()?e.fx.start():e.timers.pop()},e.fx.interval=13,e.fx.start=function(){y||(y=window.requestAnimationFrame?window.requestAnimationFrame(u):window.setInterval(e.fx.tick,e.fx.interval))},e.fx.stop=function(){window.cancelAnimationFrame?window.cancelAnimationFrame(y):window.clearInterval(y),y=null},e.fx.speeds={slow:600,fast:200,_default:400},e}.apply(t,r),!(void 0!==i&&(e.exports=i))},function(e,t,n){var r,i;r=[n(0),n(1),n(5),n(24),n(30),n(13)],i=function(e,t,n,r,i){"use strict";var o=/^(?:focusinfocus|focusoutblur)$/;return e.extend(e.event,{trigger:function(a,s,l,c){var u,f,p,d,h,m,g,v=[l||t],y=i.call(a,"type")?a.type:a,x=i.call(a,"namespace")?a.namespace.split("."):[];if(f=p=l=l||t,3!==l.nodeType&&8!==l.nodeType&&!o.test(y+e.event.triggered)&&(y.indexOf(".")>-1&&(x=y.split("."),y=x.shift(),x.sort()),h=y.indexOf(":")<0&&"on"+y,a=a[e.expando]?a:new e.Event(y,"object"==typeof a&&a),a.isTrigger=c?2:3,a.namespace=x.join("."),a.rnamespace=a.namespace?new RegExp("(^|\\.)"+x.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,a.result=void 0,a.target||(a.target=l),s=null==s?[a]:e.makeArray(s,[a]),g=e.event.special[y]||{},c||!g.trigger||g.trigger.apply(l,s)!==!1)){if(!c&&!g.noBubble&&!e.isWindow(l)){for(d=g.delegateType||y,o.test(d+y)||(f=f.parentNode);f;f=f.parentNode)v.push(f),p=f;p===(l.ownerDocument||t)&&v.push(p.defaultView||p.parentWindow||window)}for(u=0;(f=v[u++])&&!a.isPropagationStopped();)a.type=u>1?d:g.bindType||y,m=(n.get(f,"events")||{})[a.type]&&n.get(f,"handle"),m&&m.apply(f,s),m=h&&f[h],m&&m.apply&&r(f)&&(a.result=m.apply(f,s),a.result===!1&&a.preventDefault());return a.type=y,c||a.isDefaultPrevented()||g._default&&g._default.apply(v.pop(),s)!==!1||!r(l)||h&&e.isFunction(l[y])&&!e.isWindow(l)&&(p=l[h],p&&(l[h]=null),e.event.triggered=y,l[y](),e.event.triggered=void 0,p&&(l[h]=p)),a.result}},simulate:function(t,n,r){var i=e.extend(new e.Event,r,{type:t,isSimulated:!0});e.event.trigger(i,null,n)}}),e.fn.extend({trigger:function(t,n){return this.each(function(){e.event.trigger(t,n,this)})},triggerHandler:function(t,n){var r=this[0];if(r)return e.event.trigger(t,n,r,!0)}}),e}.apply(t,r),!(void 0!==i&&(e.exports=i))},function(e,t,n){var r,i;r=[n(0),n(5),n(12),n(20)],i=function(e,t){"use strict";return e.extend({queue:function(n,r,i){var o;if(n)return r=(r||"fx")+"queue",o=t.get(n,r),i&&(!o||e.isArray(i)?o=t.access(n,r,e.makeArray(i)):o.push(i)),o||[]},dequeue:function(t,n){n=n||"fx";var r=e.queue(t,n),i=r.length,o=r.shift(),a=e._queueHooks(t,n),s=function(){e.dequeue(t,n)};"inprogress"===o&&(o=r.shift(),i--),o&&("fx"===n&&r.unshift("inprogress"),delete a.stop,o.call(t,s,a)),!i&&a&&a.empty.fire()},_queueHooks:function(n,r){var i=r+"queueHooks";return t.get(n,i)||t.access(n,i,{empty:e.Callbacks("once memory").add(function(){t.remove(n,[r+"queue",i])})})}}),e.fn.extend({queue:function(t,n){var r=2;return"string"!=typeof t&&(n=t,t="fx",r--),arguments.length<r?e.queue(this[0],t):void 0===n?this:this.each(function(){var r=e.queue(this,t,n);e._queueHooks(this,t),"fx"===t&&"inprogress"!==r[0]&&e.dequeue(this,t)})},dequeue:function(t){return this.each(function(){e.dequeue(this,t)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(n,r){var i,o=1,a=e.Deferred(),s=this,l=this.length,c=function(){--o||a.resolveWith(s,[s])};for("string"!=typeof n&&(r=n,n=void 0),n=n||"fx";l--;)i=t.get(s[l],n+"queueHooks"),i&&i.empty&&(o++,i.empty.add(c));return c(),a.promise(r)}}),e}.apply(t,r),!(void 0!==i&&(e.exports=i))},function(e,t,n){var r;r=function(){"use strict";return{}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r,i;r=[n(1)],i=function(e){"use strict";return e.documentElement}.apply(t,r),!(void 0!==i&&(e.exports=i))},function(e,t,n){var r,i;r=[n(28)],i=function(e){"use strict";return e.hasOwnProperty}.apply(t,r),!(void 0!==i&&(e.exports=i))},function(e,t,n){var r,i;r=[n(16)],i=function(e){"use strict";return e.indexOf}.apply(t,r),!(void 0!==i&&(e.exports=i))},function(e,t,n){var r;r=function(){"use strict";return/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r,i;r=[n(32)],i=function(e){"use strict";return new RegExp("^(?:([+-])=|)("+e+")([a-z%]*)$","i")}.apply(t,r),!(void 0!==i&&(e.exports=i))},function(e,t,n){var r,i;r=[n(16)],i=function(e){"use strict";return e.slice}.apply(t,r),!(void 0!==i&&(e.exports=i))},function(e,t,n){"use strict";(function(e){function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=n(18),i=(n.n(r),function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}());!function(){var e={};if(!Object.setPrototypeOf&&!e.__proto__){var t=Object.getPrototypeOf;Object.getPrototypeOf=function(e){return e.__proto__?e.__proto__:t.call(Object,e)}}}(),Object.assign||(Object.assign=e.extend),Array.prototype.includes||Object.defineProperty(Array.prototype,"includes",{value:function(){for(var t,n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e).inArray.apply(t,r.concat([this]))!==-1}});var o=function(){function n(r){var i=this;t(this,n),this.deferred=e.Deferred(),r(function(e){i.deferred.resolve(e)},function(e){i.deferred.reject(e)}),this.promise=this.deferred.promise()}return i(n,[{key:"then",value:function(e,t){return this.promise.done(e),this.promise.fail(t),this}},{key:"catch",value:function(e){return this.promise.fail(e),this}}]),n}();window.Promise||(window.Promise=o)}).call(t,n(6))},function(e,t,n){!function(e){e(n(3))}(function(e){function t(e,t,n){var r,i=e.getWrapperElement();return r=i.appendChild(document.createElement("div")),n?r.className="CodeMirror-dialog CodeMirror-dialog-bottom":r.className="CodeMirror-dialog CodeMirror-dialog-top","string"==typeof t?r.innerHTML=t:r.appendChild(t),r}function n(e,t){e.state.currentNotificationClose&&e.state.currentNotificationClose(),e.state.currentNotificationClose=t}e.defineExtension("openDialog",function(r,i,o){function a(e){if("string"==typeof e)f.value=e;else{if(c)return;c=!0,l.parentNode.removeChild(l),u.focus(),o.onClose&&o.onClose(l)}}o||(o={}),n(this,null);var s,l=t(this,r,o.bottom),c=!1,u=this,f=l.getElementsByTagName("input")[0];return f?(f.focus(),o.value&&(f.value=o.value,o.selectValueOnOpen!==!1&&f.select()),o.onInput&&e.on(f,"input",function(e){o.onInput(e,f.value,a)}),o.onKeyUp&&e.on(f,"keyup",function(e){o.onKeyUp(e,f.value,a)}),e.on(f,"keydown",function(t){o&&o.onKeyDown&&o.onKeyDown(t,f.value,a)||((27==t.keyCode||o.closeOnEnter!==!1&&13==t.keyCode)&&(f.blur(),e.e_stop(t),a()),13==t.keyCode&&i(f.value,t))}),o.closeOnBlur!==!1&&e.on(f,"blur",a)):(s=l.getElementsByTagName("button")[0])&&(e.on(s,"click",function(){a(),u.focus()}),o.closeOnBlur!==!1&&e.on(s,"blur",a),s.focus()),a}),e.defineExtension("openConfirm",function(r,i,o){function a(){c||(c=!0,s.parentNode.removeChild(s),u.focus())}n(this,null);var s=t(this,r,o&&o.bottom),l=s.getElementsByTagName("button"),c=!1,u=this,f=1;l[0].focus();for(var p=0;p<l.length;++p){var d=l[p];!function(t){e.on(d,"click",function(n){e.e_preventDefault(n),a(),t&&t(u)})}(i[p]),e.on(d,"blur",function(){--f,setTimeout(function(){f<=0&&a()},200)}),e.on(d,"focus",function(){++f})}}),e.defineExtension("openNotification",function(r,i){function o(){l||(l=!0,clearTimeout(a),s.parentNode.removeChild(s))}n(this,o);var a,s=t(this,r,i&&i.bottom),l=!1,c=i&&"undefined"!=typeof i.duration?i.duration:5e3;return e.on(s,"click",function(t){e.e_preventDefault(t),o()}),c&&(a=setTimeout(o,c)),o})})},function(e,t,n){!function(e){e(n(3))}(function(e){function t(e,t,r,i){var o=e.getLineHandle(t.line),l=t.ch-1,c=l>=0&&s[o.text.charAt(l)]||s[o.text.charAt(++l)];if(!c)return null;var u=">"==c.charAt(1)?1:-1;if(r&&u>0!=(l==t.ch))return null;var f=e.getTokenTypeAt(a(t.line,l+1)),p=n(e,a(t.line,l+(u>0?1:0)),u,f||null,i);return null==p?null:{from:a(t.line,l),to:p&&p.pos,match:p&&p.ch==c.charAt(0),forward:u>0}}function n(e,t,n,r,i){for(var o=i&&i.maxScanLineLength||1e4,l=i&&i.maxScanLines||1e3,c=[],u=i&&i.bracketRegex?i.bracketRegex:/[(){}[\]]/,f=n>0?Math.min(t.line+l,e.lastLine()+1):Math.max(e.firstLine()-1,t.line-l),p=t.line;p!=f;p+=n){var d=e.getLine(p);if(d){var h=n>0?0:d.length-1,m=n>0?d.length:-1;if(!(d.length>o))for(p==t.line&&(h=t.ch-(n<0?1:0));h!=m;h+=n){var g=d.charAt(h);if(u.test(g)&&(void 0===r||e.getTokenTypeAt(a(p,h+1))==r)){var v=s[g];if(">"==v.charAt(1)==n>0)c.push(g);else{if(!c.length)return{pos:a(p,h),ch:g};c.pop()}}}}}return p-n!=(n>0?e.lastLine():e.firstLine())&&null}function r(e,n,r){for(var i=e.state.matchBrackets.maxHighlightLineLength||1e3,s=[],l=e.listSelections(),c=0;c<l.length;c++){var u=l[c].empty()&&t(e,l[c].head,!1,r);if(u&&e.getLine(u.from.line).length<=i){var f=u.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket";s.push(e.markText(u.from,a(u.from.line,u.from.ch+1),{className:f})),u.to&&e.getLine(u.to.line).length<=i&&s.push(e.markText(u.to,a(u.to.line,u.to.ch+1),{className:f}))}}if(s.length){o&&e.state.focused&&e.focus();var p=function(){e.operation(function(){for(var e=0;e<s.length;e++)s[e].clear()})};if(!n)return p;setTimeout(p,800)}}function i(e){e.operation(function(){l&&(l(),l=null),l=r(e,!1,e.state.matchBrackets)})}var o=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<8),a=e.Pos,s={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<"},l=null;e.defineOption("matchBrackets",!1,function(t,n,r){r&&r!=e.Init&&(t.off("cursorActivity",i),l&&(l(),l=null)),n&&(t.state.matchBrackets="object"==typeof n?n:{},t.on("cursorActivity",i))}),e.defineExtension("matchBrackets",function(){r(this,!0)}),e.defineExtension("findMatchingBracket",function(e,n,r){return t(this,e,n,r)}),e.defineExtension("scanForBracket",function(e,t,r,i){return n(this,e,t,r,i)})})},function(e,t,n){!function(e){e(n(3))}(function(e){"use strict";function t(e,t,i,o){if(this.atOccurrence=!1,this.doc=e,null==o&&"string"==typeof t&&(o=!1),i=i?e.clipPos(i):r(0,0),this.pos={from:i,to:i},"string"!=typeof t)t.global||(t=new RegExp(t.source,t.ignoreCase?"ig":"g")),this.matches=function(n,i){if(n){t.lastIndex=0;for(var o,a,s=e.getLine(i.line).slice(0,i.ch),l=0;;){t.lastIndex=l;var c=t.exec(s);if(!c)break;if(o=c,a=o.index,l=o.index+(o[0].length||1),l==s.length)break}var u=o&&o[0].length||0;u||(0==a&&0==s.length?o=void 0:a!=e.getLine(i.line).length&&u++)}else{t.lastIndex=i.ch;var s=e.getLine(i.line),o=t.exec(s),u=o&&o[0].length||0,a=o&&o.index;a+u==s.length||u||(u=1)}if(o&&u)return{from:r(i.line,a),to:r(i.line,a+u),match:o}};else{var a=t;o&&(t=t.toLowerCase());var s=o?function(e){return e.toLowerCase()}:function(e){return e},l=t.split("\n");if(1==l.length)t.length?this.matches=function(i,o){if(i){var l=e.getLine(o.line).slice(0,o.ch),c=s(l),u=c.lastIndexOf(t);if(u>-1)return u=n(l,c,u),{from:r(o.line,u),to:r(o.line,u+a.length)}}else{var l=e.getLine(o.line).slice(o.ch),c=s(l),u=c.indexOf(t);if(u>-1)return u=n(l,c,u)+o.ch,{from:r(o.line,u),to:r(o.line,u+a.length)}}}:this.matches=function(){};else{var c=a.split("\n");this.matches=function(t,n){var i=l.length-1;if(t){if(n.line-(l.length-1)<e.firstLine())return;if(s(e.getLine(n.line).slice(0,c[i].length))!=l[l.length-1])return;for(var o=r(n.line,c[i].length),a=n.line-1,u=i-1;u>=1;--u,--a)if(l[u]!=s(e.getLine(a)))return;var f=e.getLine(a),p=f.length-c[0].length;if(s(f.slice(p))!=l[0])return;return{from:r(a,p),to:o}}if(!(n.line+(l.length-1)>e.lastLine())){var f=e.getLine(n.line),p=f.length-c[0].length;if(s(f.slice(p))==l[0]){for(var d=r(n.line,p),a=n.line+1,u=1;u<i;++u,++a)if(l[u]!=s(e.getLine(a)))return;if(s(e.getLine(a).slice(0,c[i].length))==l[i])return{from:d,to:r(a,c[i].length)}}}}}}}function n(e,t,n){if(e.length==t.length)return n;for(var r=Math.min(n,e.length);;){var i=e.slice(0,r).toLowerCase().length;if(i<n)++r;else{if(!(i>n))return r;--r}}}var r=e.Pos;t.prototype={findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(e){function t(e){var t=r(e,0);return n.pos={from:t,to:t},n.atOccurrence=!1,!1}for(var n=this,i=this.doc.clipPos(e?this.pos.from:this.pos.to);;){if(this.pos=this.matches(e,i))return this.atOccurrence=!0,this.pos.match||!0;if(e){if(!i.line)return t(0);i=r(i.line-1,this.doc.getLine(i.line-1).length)}else{var o=this.doc.lineCount();if(i.line==o-1)return t(o);i=r(i.line+1,0)}}},from:function(){if(this.atOccurrence)return this.pos.from},to:function(){if(this.atOccurrence)return this.pos.to},replace:function(t,n){if(this.atOccurrence){var i=e.splitLines(t);this.doc.replaceRange(i,this.pos.from,this.pos.to,n),this.pos.to=r(this.pos.from.line+i.length-1,i[i.length-1].length+(1==i.length?this.pos.from.ch:0))}}},e.defineExtension("getSearchCursor",function(e,n,r){return new t(this.doc,e,n,r)}),e.defineDocExtension("getSearchCursor",function(e,n,r){return new t(this,e,n,r)}),e.defineExtension("selectMatches",function(t,n){for(var r=[],i=this.getSearchCursor(t,this.getCursor("from"),n);i.findNext()&&!(e.cmpPos(i.to(),this.getCursor("to"))>0);)r.push({anchor:i.from(),head:i.to()});r.length&&this.setSelections(r,0)})})},function(e,t,n){!function(e){e(n(3))}(function(e){"use strict";function t(e,t,n,r,i,o){this.indented=e,this.column=t,this.type=n,this.info=r,this.align=i,this.prev=o}function n(e,n,r,i){var o=e.indented;return e.context&&"statement"==e.context.type&&"statement"!=r&&(o=e.context.indented),e.context=new t(o,n,r,i,null,e.context)}function r(e){var t=e.context.type;return")"!=t&&"]"!=t&&"}"!=t||(e.indented=e.context.indented),e.context=e.context.prev}function i(e,t,n){return"variable"==t.prevToken||"variable-3"==t.prevToken||(!!/\S(?:[^- ]>|[*\]])\s*$|\*$/.test(e.string.slice(0,n))||(!(!t.typeAtEndOfLine||e.column()!=e.indentation())||void 0))}function o(e){for(;;){if(!e||"top"==e.type)return!0;if("}"==e.type&&"namespace"!=e.prev.info)return!1;e=e.prev}}function a(e){for(var t={},n=e.split(" "),r=0;r<n.length;++r)t[n[r]]=!0;return t}function s(e,t){return"function"==typeof e?e(t):e.propertyIsEnumerable(t)}function l(e,t){if(!t.startOfLine)return!1;for(var n,r=null;n=e.peek();){if("\\"==n&&e.match(/^.$/)){r=l;break}if("/"==n&&e.match(/^\/[\/\*]/,!1))break;e.next()}return t.tokenize=r,"meta"}function c(e,t){return"variable-3"==t.prevToken&&"variable-3"}function u(e){return e.eatWhile(/[\w\.']/),"number"}function f(e,t){if(e.backUp(1),e.match(/(R|u8R|uR|UR|LR)/)){var n=e.match(/"([^\s\\()]{0,16})\(/);return!!n&&(t.cpp11RawStringDelim=n[1],t.tokenize=h,h(e,t))}return e.match(/(u8|u|U|L)/)?!!e.match(/["']/,!1)&&"string":(e.next(),!1)}function p(e){var t=/(\w+)::(\w+)$/.exec(e);return t&&t[1]==t[2]}function d(e,t){for(var n;null!=(n=e.next());)if('"'==n&&!e.eat('"')){t.tokenize=null;break}return"string"}function h(e,t){var n=t.cpp11RawStringDelim.replace(/[^\w\s]/g,"\\$&"),r=e.match(new RegExp(".*?\\)"+n+'"'));return r?t.tokenize=null:e.skipToEnd(),"string"}function m(t,n){function r(e){if(e)for(var t in e)e.hasOwnProperty(t)&&i.push(t)}"string"==typeof t&&(t=[t]);var i=[];r(n.keywords),r(n.types),r(n.builtin),r(n.atoms),i.length&&(n.helperType=t[0],e.registerHelper("hintWords",t[0],i));for(var o=0;o<t.length;++o)e.defineMIME(t[o],n)}function g(e,t){for(var n=!1;!e.eol();){if(!n&&e.match('"""')){t.tokenize=null;break}n="\\"==e.next()&&!n}return"string"}function v(e){return function(t,n){for(var r,i=!1,o=!1;!t.eol();){if(!e&&!i&&t.match('"')){o=!0;break}if(e&&t.match('"""')){o=!0;break}r=t.next(),!i&&"$"==r&&t.match("{")&&t.skipTo("}"),i=!i&&"\\"==r&&!e}return!o&&e||(n.tokenize=null),"string"}}function y(e){return function(t,n){for(var r,i=!1,o=!1;!t.eol();){if(!i&&t.match('"')&&("single"==e||t.match('""'))){o=!0;break}if(!i&&t.match("``")){w=y(e),o=!0;break}r=t.next(),i="single"==e&&!i&&"\\"==r}return o&&(n.tokenize=null),"string"}}e.defineMode("clike",function(a,l){function c(e,t){var n=e.next();if(C[n]){var r=C[n](e,t);if(r!==!1)return r}if('"'==n||"'"==n)return t.tokenize=u(n),t.tokenize(e,t);if(L.test(n))return d=n,null;if(F.test(n)){if(e.backUp(1),e.match(O))return"number";e.next()}if("/"==n){if(e.eat("*"))return t.tokenize=f,f(e,t);if(e.eat("/"))return e.skipToEnd(),"comment"}if(E.test(n)){for(;!e.match(/^\/[\/*]/,!1)&&e.eat(E););return"operator"}if(e.eatWhile(/[\w\$_\xa1-\uffff]/),M)for(;e.match(M);)e.eatWhile(/[\w\$_\xa1-\uffff]/);var i=e.current();return s(y,i)?(s(w,i)&&(d="newstatement"),s(k,i)&&(h=!0),"keyword"):s(x,i)?"variable-3":s(b,i)?(s(w,i)&&(d="newstatement"),"builtin"):s(_,i)?"atom":"variable"}function u(e){return function(t,n){for(var r,i=!1,o=!1;null!=(r=t.next());){if(r==e&&!i){o=!0;break}i=!i&&"\\"==r}return(o||!i&&!S)&&(n.tokenize=null),"string"}}function f(e,t){for(var n,r=!1;n=e.next();){if("/"==n&&r){t.tokenize=null;break}r="*"==n}return"comment"}function p(e,t){l.typeFirstDefinitions&&e.eol()&&o(t.context)&&(t.typeAtEndOfLine=i(e,t,e.pos))}var d,h,m=a.indentUnit,g=l.statementIndentUnit||m,v=l.dontAlignCalls,y=l.keywords||{},x=l.types||{},b=l.builtin||{},w=l.blockKeywords||{},k=l.defKeywords||{},_=l.atoms||{},C=l.hooks||{},S=l.multiLineStrings,T=l.indentStatements!==!1,A=l.indentSwitch!==!1,M=l.namespaceSeparator,L=l.isPunctuationChar||/[\[\]{}\(\),;\:\.]/,F=l.numberStart||/[\d\.]/,O=l.number||/^(?:0x[a-f\d]+|0b[01]+|(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?)(u|ll?|l|f)?/i,E=l.isOperatorChar||/[+\-*&%=<>!?|\/]/;return{startState:function(e){return{tokenize:null,context:new t((e||0)-m,0,"top",null,!1),indented:0,startOfLine:!0,prevToken:null}},token:function(e,t){var a=t.context;if(e.sol()&&(null==a.align&&(a.align=!1),t.indented=e.indentation(),t.startOfLine=!0),e.eatSpace())return p(e,t),null;d=h=null;var s=(t.tokenize||c)(e,t);if("comment"==s||"meta"==s)return s;if(null==a.align&&(a.align=!0),";"==d||":"==d||","==d&&e.match(/^\s*(?:\/\/.*)?$/,!1))for(;"statement"==t.context.type;)r(t);else if("{"==d)n(t,e.column(),"}");else if("["==d)n(t,e.column(),"]");else if("("==d)n(t,e.column(),")");else if("}"==d){for(;"statement"==a.type;)a=r(t);for("}"==a.type&&(a=r(t));"statement"==a.type;)a=r(t)}else d==a.type?r(t):T&&(("}"==a.type||"top"==a.type)&&";"!=d||"statement"==a.type&&"newstatement"==d)&&n(t,e.column(),"statement",e.current());if("variable"==s&&("def"==t.prevToken||l.typeFirstDefinitions&&i(e,t,e.start)&&o(t.context)&&e.match(/^\s*\(/,!1))&&(s="def"),C.token){var u=C.token(e,t,s);void 0!==u&&(s=u)}return"def"==s&&l.styleDefs===!1&&(s="variable"),t.startOfLine=!1,t.prevToken=h?"def":s||d,p(e,t),s},indent:function(t,n){if(t.tokenize!=c&&null!=t.tokenize||t.typeAtEndOfLine)return e.Pass;var r=t.context,i=n&&n.charAt(0);if("statement"==r.type&&"}"==i&&(r=r.prev),l.dontIndentStatements)for(;"statement"==r.type&&l.dontIndentStatements.test(r.info);)r=r.prev;if(C.indent){var o=C.indent(t,r,n);if("number"==typeof o)return o}var a=i==r.type,s=r.prev&&"switch"==r.prev.info;if(l.allmanIndentation&&/[{(]/.test(i)){for(;"top"!=r.type&&"}"!=r.type;)r=r.prev;return r.indented}return"statement"==r.type?r.indented+("{"==i?0:g):!r.align||v&&")"==r.type?")"!=r.type||a?r.indented+(a?0:m)+(a||!s||/^(?:case|default)\b/.test(n)?0:m):r.indented+g:r.column+(a?0:1)},electricInput:A?/^\s*(?:case .*?:|default:|\{\}?|\})$/:/^\s*[{}]$/,blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//",fold:"brace"}});var x="auto if break case register continue return default do sizeof static else struct switch extern typedef union for goto while enum const volatile",b="int long char short double float unsigned signed void size_t ptrdiff_t";m(["text/x-csrc","text/x-c","text/x-chdr"],{name:"clike",keywords:a(x),types:a(b+" bool _Complex _Bool float_t double_t intptr_t intmax_t int8_t int16_t int32_t int64_t uintptr_t uintmax_t uint8_t uint16_t uint32_t uint64_t"),blockKeywords:a("case do else for if switch while struct"),defKeywords:a("struct"),typeFirstDefinitions:!0,atoms:a("null true false"),hooks:{"#":l,"*":c},modeProps:{fold:["brace","include"]}}),m(["text/x-c++src","text/x-c++hdr"],{name:"clike",keywords:a(x+" asm dynamic_cast namespace reinterpret_cast try explicit new static_cast typeid catch operator template typename class friend private this using const_cast inline public throw virtual delete mutable protected alignas alignof constexpr decltype nullptr noexcept thread_local final static_assert override"),types:a(b+" bool wchar_t"),blockKeywords:a("catch class do else finally for if struct switch try while"),defKeywords:a("class namespace struct enum union"),typeFirstDefinitions:!0,atoms:a("true false null"),dontIndentStatements:/^template$/,hooks:{"#":l,"*":c,u:f,U:f,L:f,R:f,0:u,1:u,2:u,3:u,4:u,5:u,6:u,7:u,8:u,9:u,token:function(e,t,n){if("variable"==n&&"("==e.peek()&&(";"==t.prevToken||null==t.prevToken||"}"==t.prevToken)&&p(e.current()))return"def"}},namespaceSeparator:"::",modeProps:{fold:["brace","include"]}}),m("text/x-java",{name:"clike",keywords:a("abstract assert break case catch class const continue default do else enum extends final finally float for goto if implements import instanceof interface native new package private protected public return static strictfp super switch synchronized this throw throws transient try volatile while"),types:a("byte short int long float double boolean char void Boolean Byte Character Double Float Integer Long Number Object Short String StringBuffer StringBuilder Void"),blockKeywords:a("catch class do else finally for if switch try while"),defKeywords:a("class interface package enum"),typeFirstDefinitions:!0,atoms:a("true false null"),number:/^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+\.?\d*|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,hooks:{"@":function(e){return e.eatWhile(/[\w\$_]/),"meta"}},modeProps:{fold:["brace","import"]}}),m("text/x-csharp",{name:"clike",keywords:a("abstract as async await base break case catch checked class const continue default delegate do else enum event explicit extern finally fixed for foreach goto if implicit in interface internal is lock namespace new operator out override params private protected public readonly ref return sealed sizeof stackalloc static struct switch this throw try typeof unchecked unsafe using virtual void volatile while add alias ascending descending dynamic from get global group into join let orderby partial remove select set value var yield"),types:a("Action Boolean Byte Char DateTime DateTimeOffset Decimal Double Func Guid Int16 Int32 Int64 Object SByte Single String Task TimeSpan UInt16 UInt32 UInt64 bool byte char decimal double short int long object sbyte float string ushort uint ulong"),
0 ignored issues
show
Bug introduced by
The variable a does not seem to be initialized in case the for loop on line 7 is not entered. Are you sure this can never be the case?
Loading history...
Complexity Best Practice introduced by
There is no return statement if o && u is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Bug introduced by
The variable navigator seems to be never declared. If this is a global, consider adding a /** global: navigator */ comment.

This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.

To learn more about declaring variables in Javascript, see the MDN.

Loading history...
Complexity Best Practice introduced by
There is no return statement if f = p = l = l || t, 3 !=...gger.apply(l, s) !== !1 is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Complexity Best Practice introduced by
There is no return statement if this.atOccurrence is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Comprehensibility Naming Best Practice introduced by
The variable u already seems to be declared on line 7. Consider using another variable name or omitting the var keyword.

This check looks for variables that are declared in multiple lines. There may be several reasons for this.

In the simplest case the variable name was reused by mistake. This may lead to very hard to locate bugs.

If you want to reuse a variable for another purpose, consider declaring it at or near the top of your function and just assigning to it subsequently so it is always declared.

Loading history...
Bug introduced by
The variable i is changed as part of the for loop for example by !1 on line 7. Only the value of the last iteration will be visible in this function if it is called after the loop.
Loading history...
Complexity Best Practice introduced by
There is no return statement if s(e.getLine(a).slice(0, c.i.length)) == l.i is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Bug introduced by
The variable d does not seem to be initialized in case !c && !g.noBubble && !e.isWindow(l) on line 7 is false. Are you sure this can never be the case?
Loading history...
Comprehensibility Naming Best Practice introduced by
The variable s already seems to be declared on line 7. Consider using another variable name or omitting the var keyword.

This check looks for variables that are declared in multiple lines. There may be several reasons for this.

In the simplest case the variable name was reused by mistake. This may lead to very hard to locate bugs.

If you want to reuse a variable for another purpose, consider declaring it at or near the top of your function and just assigning to it subsequently so it is always declared.

Loading history...
Bug introduced by
The variable c is changed as part of the for loop for example by c-- on line 7. Only the value of the last iteration will be visible in this function if it is called after the loop.
Loading history...
Comprehensibility Naming Best Practice introduced by
The variable f already seems to be declared on line 7. Consider using another variable name or omitting the var keyword.

This check looks for variables that are declared in multiple lines. There may be several reasons for this.

In the simplest case the variable name was reused by mistake. This may lead to very hard to locate bugs.

If you want to reuse a variable for another purpose, consider declaring it at or near the top of your function and just assigning to it subsequently so it is always declared.

Loading history...
Compatibility Best Practice introduced by
You are extending the built-in type Object. This may have unintended consequences on other objects using this built-in type. Consider subclassing instead.
Loading history...
Complexity Best Practice introduced by
There is no return statement if s.length is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Bug introduced by
The variable c is changed as part of the for loop for example by ++c on line 7. Only the value of the last iteration will be visible in this function if it is called after the loop.
Loading history...
Bug introduced by
The variable f is changed as part of the for loop for example by --f on line 7. Only the value of the last iteration will be visible in this function if it is called after the loop.
Loading history...
Coding Style Best Practice introduced by
By convention, constructors like t should be capitalized.
Loading history...
Complexity Best Practice introduced by
There is no return statement if "variable" == n && "(" =...Token && p(e.current()) is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
introduced by
The variable i is changed by the for-each loop on line 7. Only the value of the last iteration will be visible in this function if it is called outside of the loop.
Loading history...
Bug introduced by
The variable w is changed as part of the for-each loop for example by k.hidden on line 7. Only the value of the last iteration will be visible in this function if it is called after the loop.
Loading history...
Comprehensibility introduced by
Usage of the sequence operator is discouraged, since it may lead to obfuscated code.

The sequence or comma operator allows the inclusion of multiple expressions where only is permitted. The result of the sequence is the value of the last expression.

This operator is most often used in for statements.

Used in another places it can make code hard to read, especially when people do not realize it even exists as a seperate operator.

This check looks for usage of the sequence operator in locations where it is not necessary and could be replaced by a series of expressions or statements.

var a,b,c;

a = 1, b = 1,  c= 3;

could just as well be written as:

var a,b,c;

a = 1;
b = 1;
c = 3;

To learn more about the sequence operator, please refer to the MDN.

Loading history...
Bug introduced by
The variable g does not seem to be initialized in case f = p = l = l || t, 3 !=...gger.apply(l, s) !== !1 on line 7 is true. Are you sure this can never be the case?
Loading history...
Coding Style Best Practice introduced by
Curly braces around statements make for more readable code and help prevent bugs when you add further statements.

Consider adding curly braces around all statements when they are executed conditionally. This is optional if there is only one statement, but leaving them out can lead to unexpected behaviour if another statement is added later.

Consider:

if (a > 0)
    b = 42;

If you or someone else later decides to put another statement in, only the first statement will be executed.

if (a > 0)
    console.log("a > 0");
    b = 42;

In this case the statement b = 42 will always be executed, while the logging statement will be executed conditionally.

if (a > 0) {
    console.log("a > 0");
    b = 42;
}

ensures that the proper code will be executed conditionally no matter how many statements are added or removed.

Loading history...
Bug introduced by
The variable r seems to not be initialized for all possible execution paths. Are you sure inArray handles undefined variables?
Loading history...
Best Practice introduced by
There is no return statement in this branch, but you do return something in other branches. Did you maybe miss it? If you do not want to return anything, consider adding return undefined; explicitly.
Loading history...
Comprehensibility Naming Best Practice introduced by
The variable l already seems to be declared on line 7. Consider using another variable name or omitting the var keyword.

This check looks for variables that are declared in multiple lines. There may be several reasons for this.

In the simplest case the variable name was reused by mistake. This may lead to very hard to locate bugs.

If you want to reuse a variable for another purpose, consider declaring it at or near the top of your function and just assigning to it subsequently so it is always declared.

Loading history...
Comprehensibility Naming Best Practice introduced by
The variable o already seems to be declared on line 7. Consider using another variable name or omitting the var keyword.

This check looks for variables that are declared in multiple lines. There may be several reasons for this.

In the simplest case the variable name was reused by mistake. This may lead to very hard to locate bugs.

If you want to reuse a variable for another purpose, consider declaring it at or near the top of your function and just assigning to it subsequently so it is always declared.

Loading history...
Complexity Best Practice introduced by
There is no return statement if u > -1 is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
introduced by
The for loop does not have a body. Maybe you have misplaced a semicolon. If you do wish to have a loop without a body, use an empty body {}.
Loading history...
Comprehensibility Naming Best Practice introduced by
The variable c already seems to be declared on line 7. Consider using another variable name or omitting the var keyword.

This check looks for variables that are declared in multiple lines. There may be several reasons for this.

In the simplest case the variable name was reused by mistake. This may lead to very hard to locate bugs.

If you want to reuse a variable for another purpose, consider declaring it at or near the top of your function and just assigning to it subsequently so it is always declared.

Loading history...
Complexity Best Practice introduced by
There is no return statement if s(f.slice(p)) == l.0 is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Coding Style introduced by
Consider using undefined instead of void(0). It is equivalent and more straightforward to read.
Loading history...
Comprehensibility Naming Best Practice introduced by
The variable a already seems to be declared on line 7. Consider using another variable name or omitting the var keyword.

This check looks for variables that are declared in multiple lines. There may be several reasons for this.

In the simplest case the variable name was reused by mistake. This may lead to very hard to locate bugs.

If you want to reuse a variable for another purpose, consider declaring it at or near the top of your function and just assigning to it subsequently so it is always declared.

Loading history...
Bug introduced by
The variable d is changed as part of the for loop for example by l.p on line 7. Only the value of the last iteration will be visible in this function if it is called after the loop.
Loading history...
Complexity Best Practice introduced by
There is no return statement if n is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Complexity Best Practice introduced by
There is no return statement if !(n.line + l.length - 1 > e.lastLine()) is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Comprehensibility Naming Best Practice introduced by
The variable p already seems to be declared on line 7. Consider using another variable name or omitting the var keyword.

This check looks for variables that are declared in multiple lines. There may be several reasons for this.

In the simplest case the variable name was reused by mistake. This may lead to very hard to locate bugs.

If you want to reuse a variable for another purpose, consider declaring it at or near the top of your function and just assigning to it subsequently so it is always declared.

Loading history...
Complexity Best Practice introduced by
There is no return statement if r is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Bug introduced by
The variable h seems to not be initialized for all possible execution paths.
Loading history...
8
blockKeywords:a("catch class do else finally for foreach if struct switch try while"),defKeywords:a("class interface namespace struct var"),typeFirstDefinitions:!0,atoms:a("true false null"),hooks:{"@":function(e,t){return e.eat('"')?(t.tokenize=d,d(e,t)):(e.eatWhile(/[\w\$_]/),"meta")}}}),m("text/x-scala",{name:"clike",keywords:a("abstract case catch class def do else extends final finally for forSome if implicit import lazy match new null object override package private protected return sealed super this throw trait try type val var while with yield _ : = => <- <: <% >: # @ assert assume require print println printf readLine readBoolean readByte readShort readChar readInt readLong readFloat readDouble :: #:: "),types:a("AnyVal App Application Array BufferedIterator BigDecimal BigInt Char Console Either Enumeration Equiv Error Exception Fractional Function IndexedSeq Int Integral Iterable Iterator List Map Numeric Nil NotNull Option Ordered Ordering PartialFunction PartialOrdering Product Proxy Range Responder Seq Serializable Set Specializable Stream StringBuilder StringContext Symbol Throwable Traversable TraversableOnce Tuple Unit Vector Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable Compiler Double Exception Float Integer Long Math Number Object Package Pair Process Runtime Runnable SecurityManager Short StackTraceElement StrictMath String StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void"),multiLineStrings:!0,blockKeywords:a("catch class do else finally for forSome if match switch try while"),defKeywords:a("class def object package trait type val var"),atoms:a("true false null"),indentStatements:!1,indentSwitch:!1,hooks:{"@":function(e){return e.eatWhile(/[\w\$_]/),"meta"},'"':function(e,t){return!!e.match('""')&&(t.tokenize=g,t.tokenize(e,t))},"'":function(e){return e.eatWhile(/[\w\$_\xa1-\uffff]/),"atom"},"=":function(e,n){var r=n.context;return!("}"!=r.type||!r.align||!e.eat(">"))&&(n.context=new t(r.indented,r.column,r.type,r.info,null,r.prev),"operator")}},modeProps:{closeBrackets:{triples:'"'}}}),m("text/x-kotlin",{name:"clike",keywords:a("package as typealias class interface this super val var fun for is in This throw return break continue object if else while do try when !in !is as? file import where by get set abstract enum open inner override private public internal protected catch finally out final vararg reified dynamic companion constructor init sealed field property receiver param sparam lateinit data inline noinline tailrec external annotation crossinline const operator infix"),types:a("Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable Compiler Double Exception Float Integer Long Math Number Object Package Pair Process Runtime Runnable SecurityManager Short StackTraceElement StrictMath String StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void"),intendSwitch:!1,indentStatements:!1,multiLineStrings:!0,blockKeywords:a("catch class do else finally for if where try while enum"),defKeywords:a("class val var object package interface fun"),atoms:a("true false null this"),hooks:{'"':function(e,t){return t.tokenize=v(e.match('""')),t.tokenize(e,t)}},modeProps:{closeBrackets:{triples:'"'}}}),m(["x-shader/x-vertex","x-shader/x-fragment"],{name:"clike",keywords:a("sampler1D sampler2D sampler3D samplerCube sampler1DShadow sampler2DShadow const attribute uniform varying break continue discard return for while do if else struct in out inout"),types:a("float int bool void vec2 vec3 vec4 ivec2 ivec3 ivec4 bvec2 bvec3 bvec4 mat2 mat3 mat4"),blockKeywords:a("for while do if else struct"),builtin:a("radians degrees sin cos tan asin acos atan pow exp log exp2 sqrt inversesqrt abs sign floor ceil fract mod min max clamp mix step smoothstep length distance dot cross normalize ftransform faceforward reflect refract matrixCompMult lessThan lessThanEqual greaterThan greaterThanEqual equal notEqual any all not texture1D texture1DProj texture1DLod texture1DProjLod texture2D texture2DProj texture2DLod texture2DProjLod texture3D texture3DProj texture3DLod texture3DProjLod textureCube textureCubeLod shadow1D shadow2D shadow1DProj shadow2DProj shadow1DLod shadow2DLod shadow1DProjLod shadow2DProjLod dFdx dFdy fwidth noise1 noise2 noise3 noise4"),atoms:a("true false gl_FragColor gl_SecondaryColor gl_Normal gl_Vertex gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 gl_FogCoord gl_PointCoord gl_Position gl_PointSize gl_ClipVertex gl_FrontColor gl_BackColor gl_FrontSecondaryColor gl_BackSecondaryColor gl_TexCoord gl_FogFragCoord gl_FragCoord gl_FrontFacing gl_FragData gl_FragDepth gl_ModelViewMatrix gl_ProjectionMatrix gl_ModelViewProjectionMatrix gl_TextureMatrix gl_NormalMatrix gl_ModelViewMatrixInverse gl_ProjectionMatrixInverse gl_ModelViewProjectionMatrixInverse gl_TexureMatrixTranspose gl_ModelViewMatrixInverseTranspose gl_ProjectionMatrixInverseTranspose gl_ModelViewProjectionMatrixInverseTranspose gl_TextureMatrixInverseTranspose gl_NormalScale gl_DepthRange gl_ClipPlane gl_Point gl_FrontMaterial gl_BackMaterial gl_LightSource gl_LightModel gl_FrontLightModelProduct gl_BackLightModelProduct gl_TextureColor gl_EyePlaneS gl_EyePlaneT gl_EyePlaneR gl_EyePlaneQ gl_FogParameters gl_MaxLights gl_MaxClipPlanes gl_MaxTextureUnits gl_MaxTextureCoords gl_MaxVertexAttribs gl_MaxVertexUniformComponents gl_MaxVaryingFloats gl_MaxVertexTextureImageUnits gl_MaxTextureImageUnits gl_MaxFragmentUniformComponents gl_MaxCombineTextureImageUnits gl_MaxDrawBuffers"),indentSwitch:!1,hooks:{"#":l},modeProps:{fold:["brace","include"]}}),m("text/x-nesc",{name:"clike",keywords:a(x+"as atomic async call command component components configuration event generic implementation includes interface module new norace nx_struct nx_union post provides signal task uses abstract extends"),types:a(b),blockKeywords:a("case do else for if switch while struct"),atoms:a("null true false"),hooks:{"#":l},modeProps:{fold:["brace","include"]}}),m("text/x-objectivec",{name:"clike",keywords:a(x+"inline restrict _Bool _Complex _Imaginary BOOL Class bycopy byref id IMP in inout nil oneway out Protocol SEL self super atomic nonatomic retain copy readwrite readonly"),types:a(b),atoms:a("YES NO NULL NILL ON OFF true false"),hooks:{"@":function(e){return e.eatWhile(/[\w\$]/),"keyword"},"#":l,indent:function(e,t,n){if("statement"==t.type&&/^@\w/.test(n))return t.indented}},modeProps:{fold:"brace"}}),m("text/x-squirrel",{name:"clike",keywords:a("base break clone continue const default delete enum extends function in class foreach local resume return this throw typeof yield constructor instanceof static"),types:a(b),blockKeywords:a("case catch class else for foreach if switch try while"),defKeywords:a("function local class"),typeFirstDefinitions:!0,atoms:a("true false null"),hooks:{"#":l},modeProps:{fold:["brace","include"]}});var w=null;m("text/x-ceylon",{name:"clike",keywords:a("abstracts alias assembly assert assign break case catch class continue dynamic else exists extends finally for function given if import in interface is let module new nonempty object of out outer package return satisfies super switch then this throw try value void while"),types:function(e){var t=e.charAt(0);return t===t.toUpperCase()&&t!==t.toLowerCase()},blockKeywords:a("case catch class dynamic else finally for function if interface module new object switch try while"),defKeywords:a("class dynamic function interface module object package value"),builtin:a("abstract actual aliased annotation by default deprecated doc final formal late license native optional sealed see serializable shared suppressWarnings tagged throws variable"),isPunctuationChar:/[\[\]{}\(\),;\:\.`]/,isOperatorChar:/[+\-*&%=<>!?|^~:\/]/,numberStart:/[\d#$]/,number:/^(?:#[\da-fA-F_]+|\$[01_]+|[\d_]+[kMGTPmunpf]?|[\d_]+\.[\d_]+(?:[eE][-+]?\d+|[kMGTPmunpf]|)|)/i,multiLineStrings:!0,typeFirstDefinitions:!0,atoms:a("true false null larger smaller equal empty finished"),indentSwitch:!1,styleDefs:!1,hooks:{"@":function(e){return e.eatWhile(/[\w\$_]/),"meta"},'"':function(e,t){return t.tokenize=y(e.match('""')?"triple":"single"),t.tokenize(e,t)},"`":function(e,t){return!(!w||!e.match("`"))&&(t.tokenize=w,w=null,t.tokenize(e,t))},"'":function(e){return e.eatWhile(/[\w\$_\xa1-\uffff]/),"atom"},token:function(e,t,n){if(("variable"==n||"variable-3"==n)&&"."==t.prevToken)return"variable-2"}},modeProps:{fold:["brace","import"],closeBrackets:{triples:'"'}}})})},function(e,t,n){!function(e){e(n(3))}(function(e){"use strict";function t(e){for(var t={},n=0;n<e.length;++n)t[e[n].toLowerCase()]=!0;return t}function n(e,t){for(var n,r=!1;null!=(n=e.next());){if(r&&"/"==n){t.tokenize=null;break}r="*"==n}return["comment","comment"]}e.defineMode("css",function(t,n){function r(e,t){return h=t,e}function i(e,t){var n=e.next();if(v[n]){var i=v[n](e,t);if(i!==!1)return i}return"@"==n?(e.eatWhile(/[\w\\\-]/),r("def",e.current())):"="==n||("~"==n||"|"==n)&&e.eat("=")?r(null,"compare"):'"'==n||"'"==n?(t.tokenize=o(n),t.tokenize(e,t)):"#"==n?(e.eatWhile(/[\w\\\-]/),r("atom","hash")):"!"==n?(e.match(/^\s*\w*/),r("keyword","important")):/\d/.test(n)||"."==n&&e.eat(/\d/)?(e.eatWhile(/[\w.%]/),r("number","unit")):"-"!==n?/[,+>*\/]/.test(n)?r(null,"select-op"):"."==n&&e.match(/^-?[_a-z][_a-z0-9-]*/i)?r("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(n)?r(null,n):"u"==n&&e.match(/rl(-prefix)?\(/)||"d"==n&&e.match("omain(")||"r"==n&&e.match("egexp(")?(e.backUp(1),t.tokenize=a,r("property","word")):/[\w\\\-]/.test(n)?(e.eatWhile(/[\w\\\-]/),r("property","word")):r(null,null):/[\d.]/.test(e.peek())?(e.eatWhile(/[\w.%]/),r("number","unit")):e.match(/^-[\w\\\-]+/)?(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?r("variable-2","variable-definition"):r("variable-2","variable")):e.match(/^\w+-/)?r("meta","meta"):void 0}function o(e){return function(t,n){for(var i,o=!1;null!=(i=t.next());){if(i==e&&!o){")"==e&&t.backUp(1);break}o=!o&&"\\"==i}return(i==e||!o&&")"!=e)&&(n.tokenize=null),r("string","string")}}function a(e,t){return e.next(),e.match(/\s*[\"\')]/,!1)?t.tokenize=null:t.tokenize=o(")"),r(null,"(")}function s(e,t,n){this.type=e,this.indent=t,this.prev=n}function l(e,t,n,r){return e.context=new s(n,t.indentation()+(r===!1?0:g),e.context),n}function c(e){return e.context.prev&&(e.context=e.context.prev),e.context.type}function u(e,t,n){return F[n.context.type](e,t,n)}function f(e,t,n,r){for(var i=r||1;i>0;i--)n.context=n.context.prev;return u(e,t,n)}function p(e){var t=e.current().toLowerCase();m=A.hasOwnProperty(t)?"atom":T.hasOwnProperty(t)?"keyword":"variable"}var d=n.inline;n.propertyKeywords||(n=e.resolveMode("text/css"));var h,m,g=t.indentUnit,v=n.tokenHooks,y=n.documentTypes||{},x=n.mediaTypes||{},b=n.mediaFeatures||{},w=n.mediaValueKeywords||{},k=n.propertyKeywords||{},_=n.nonStandardPropertyKeywords||{},C=n.fontProperties||{},S=n.counterDescriptors||{},T=n.colorKeywords||{},A=n.valueKeywords||{},M=n.allowNested,L=n.supportsAtComponent===!0,F={};return F.top=function(e,t,n){if("{"==e)return l(n,t,"block");if("}"==e&&n.context.prev)return c(n);if(L&&/@component/.test(e))return l(n,t,"atComponentBlock");if(/^@(-moz-)?document$/.test(e))return l(n,t,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/.test(e))return l(n,t,"atBlock");if(/^@(font-face|counter-style)/.test(e))return n.stateArg=e,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/.test(e))return"keyframes";if(e&&"@"==e.charAt(0))return l(n,t,"at");if("hash"==e)m="builtin";else if("word"==e)m="tag";else{if("variable-definition"==e)return"maybeprop";if("interpolation"==e)return l(n,t,"interpolation");if(":"==e)return"pseudo";if(M&&"("==e)return l(n,t,"parens")}return n.context.type},F.block=function(e,t,n){if("word"==e){var r=t.current().toLowerCase();return k.hasOwnProperty(r)?(m="property","maybeprop"):_.hasOwnProperty(r)?(m="string-2","maybeprop"):M?(m=t.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(m+=" error","maybeprop")}return"meta"==e?"block":M||"hash"!=e&&"qualifier"!=e?F.top(e,t,n):(m="error","block")},F.maybeprop=function(e,t,n){return":"==e?l(n,t,"prop"):u(e,t,n)},F.prop=function(e,t,n){if(";"==e)return c(n);if("{"==e&&M)return l(n,t,"propBlock");if("}"==e||"{"==e)return f(e,t,n);if("("==e)return l(n,t,"parens");if("hash"!=e||/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(t.current())){if("word"==e)p(t);else if("interpolation"==e)return l(n,t,"interpolation")}else m+=" error";return"prop"},F.propBlock=function(e,t,n){return"}"==e?c(n):"word"==e?(m="property","maybeprop"):n.context.type},F.parens=function(e,t,n){return"{"==e||"}"==e?f(e,t,n):")"==e?c(n):"("==e?l(n,t,"parens"):"interpolation"==e?l(n,t,"interpolation"):("word"==e&&p(t),"parens")},F.pseudo=function(e,t,n){return"word"==e?(m="variable-3",n.context.type):u(e,t,n)},F.documentTypes=function(e,t,n){return"word"==e&&y.hasOwnProperty(t.current())?(m="tag",n.context.type):F.atBlock(e,t,n)},F.atBlock=function(e,t,n){if("("==e)return l(n,t,"atBlock_parens");if("}"==e||";"==e)return f(e,t,n);if("{"==e)return c(n)&&l(n,t,M?"block":"top");if("interpolation"==e)return l(n,t,"interpolation");if("word"==e){var r=t.current().toLowerCase();m="only"==r||"not"==r||"and"==r||"or"==r?"keyword":x.hasOwnProperty(r)?"attribute":b.hasOwnProperty(r)?"property":w.hasOwnProperty(r)?"keyword":k.hasOwnProperty(r)?"property":_.hasOwnProperty(r)?"string-2":A.hasOwnProperty(r)?"atom":T.hasOwnProperty(r)?"keyword":"error"}return n.context.type},F.atComponentBlock=function(e,t,n){return"}"==e?f(e,t,n):"{"==e?c(n)&&l(n,t,M?"block":"top",!1):("word"==e&&(m="error"),n.context.type)},F.atBlock_parens=function(e,t,n){return")"==e?c(n):"{"==e||"}"==e?f(e,t,n,2):F.atBlock(e,t,n)},F.restricted_atBlock_before=function(e,t,n){return"{"==e?l(n,t,"restricted_atBlock"):"word"==e&&"@counter-style"==n.stateArg?(m="variable","restricted_atBlock_before"):u(e,t,n)},F.restricted_atBlock=function(e,t,n){return"}"==e?(n.stateArg=null,c(n)):"word"==e?(m="@font-face"==n.stateArg&&!C.hasOwnProperty(t.current().toLowerCase())||"@counter-style"==n.stateArg&&!S.hasOwnProperty(t.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},F.keyframes=function(e,t,n){return"word"==e?(m="variable","keyframes"):"{"==e?l(n,t,"top"):u(e,t,n)},F.at=function(e,t,n){return";"==e?c(n):"{"==e||"}"==e?f(e,t,n):("word"==e?m="tag":"hash"==e&&(m="builtin"),"at")},F.interpolation=function(e,t,n){return"}"==e?c(n):"{"==e||";"==e?f(e,t,n):("word"==e?m="variable":"variable"!=e&&"("!=e&&")"!=e&&(m="error"),"interpolation")},{startState:function(e){return{tokenize:null,state:d?"block":"top",stateArg:null,context:new s(d?"block":"top",e||0,null)}},token:function(e,t){if(!t.tokenize&&e.eatSpace())return null;var n=(t.tokenize||i)(e,t);return n&&"object"==typeof n&&(h=n[1],n=n[0]),m=n,t.state=F[t.state](h,e,t),m},indent:function(e,t){var n=e.context,r=t&&t.charAt(0),i=n.indent;return"prop"!=n.type||"}"!=r&&")"!=r||(n=n.prev),n.prev&&("}"!=r||"block"!=n.type&&"top"!=n.type&&"interpolation"!=n.type&&"restricted_atBlock"!=n.type?(")"!=r||"parens"!=n.type&&"atBlock_parens"!=n.type)&&("{"!=r||"at"!=n.type&&"atBlock"!=n.type)||(i=Math.max(0,n.indent-g),n=n.prev):(n=n.prev,i=n.indent)),i},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",fold:"brace"}});var r=["domain","regexp","url","url-prefix"],i=t(r),o=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],a=t(o),s=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid","orientation","device-pixel-ratio","min-device-pixel-ratio","max-device-pixel-ratio","pointer","any-pointer","hover","any-hover"],l=t(s),c=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive"],u=t(c),f=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","baseline-shift","binding","bleed","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-feature-settings","font-family","font-kerning","font-language-override","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-weight","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-gap","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-gap","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","justify-content","left","letter-spacing","line-break","line-height","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","max-height","max-width","min-height","min-width","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotation","rotation-point","ruby-align","ruby-overhang","ruby-position","ruby-span","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-outline","text-overflow","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","user-select","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode"],p=t(f),d=["scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-3d-light-color","scrollbar-track-color","shape-inside","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","zoom"],h=t(d),m=["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],g=t(m),v=["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"],y=t(v),x=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],b=t(x),w=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","graytext","grid","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","luminosity","malayalam","match","matrix","matrix3d","media-controls-background","media-current-time-display","media-fullscreen-button","media-mute-button","media-play-button","media-return-to-realtime-button","media-rewind-button","media-seek-back-button","media-seek-forward-button","media-slider","media-sliderthumb","media-time-remaining-display","media-volume-slider","media-volume-slider-container","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menulist-text","menulist-textfield","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","multiply","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","opacity","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","semi-condensed","semi-expanded","separate","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","spell-out","square","square-button","start","static","status-bar","stretch","stroke","sub","subpixel-antialiased","super","sw-resize","symbolic","symbols","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unset","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"],k=t(w),_=r.concat(o).concat(s).concat(c).concat(f).concat(d).concat(x).concat(w);e.registerHelper("hintWords","css",_),e.defineMIME("text/css",{documentTypes:i,mediaTypes:a,mediaFeatures:l,mediaValueKeywords:u,propertyKeywords:p,nonStandardPropertyKeywords:h,fontProperties:g,counterDescriptors:y,colorKeywords:b,valueKeywords:k,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=n,n(e,t))}},name:"css"}),e.defineMIME("text/x-scss",{mediaTypes:a,mediaFeatures:l,mediaValueKeywords:u,propertyKeywords:p,nonStandardPropertyKeywords:h,colorKeywords:b,valueKeywords:k,fontProperties:g,allowNested:!0,tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=n,n(e,t)):["operator","operator"]},":":function(e){return!!e.match(/\s*\{/)&&[null,"{"]},$:function(e){return e.match(/^[\w-]+/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(e){return!!e.eat("{")&&[null,"interpolation"]}},name:"css",helperType:"scss"}),e.defineMIME("text/x-less",{mediaTypes:a,mediaFeatures:l,
0 ignored issues
show
Coding Style Best Practice introduced by
By convention, constructors like t should be capitalized.
Loading history...
Comprehensibility introduced by
Usage of the sequence operator is discouraged, since it may lead to obfuscated code.

The sequence or comma operator allows the inclusion of multiple expressions where only is permitted. The result of the sequence is the value of the last expression.

This operator is most often used in for statements.

Used in another places it can make code hard to read, especially when people do not realize it even exists as a seperate operator.

This check looks for usage of the sequence operator in locations where it is not necessary and could be replaced by a series of expressions or statements.

var a,b,c;

a = 1, b = 1,  c= 3;

could just as well be written as:

var a,b,c;

a = 1;
b = 1;
c = 3;

To learn more about the sequence operator, please refer to the MDN.

Loading history...
Coding Style Best Practice introduced by
By convention, constructors like s should be capitalized.
Loading history...
Coding Style introduced by
Consider using undefined instead of void(0). It is equivalent and more straightforward to read.
Loading history...
Unused Code introduced by
The assignment to variable n seems to be never used. Consider removing it.
Loading history...
Bug introduced by
The variable h seems to not be initialized for all possible execution paths.
Loading history...
Complexity Best Practice introduced by
There is no return statement if "statement" == t.type && ^@\w.test(n) is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Complexity Best Practice introduced by
There is no return statement if "variable" == n || "vari...n && "." == t.prevToken is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Coding Style Best Practice introduced by
Curly braces around statements make for more readable code and help prevent bugs when you add further statements.

Consider adding curly braces around all statements when they are executed conditionally. This is optional if there is only one statement, but leaving them out can lead to unexpected behaviour if another statement is added later.

Consider:

if (a > 0)
    b = 42;

If you or someone else later decides to put another statement in, only the first statement will be executed.

if (a > 0)
    console.log("a > 0");
    b = 42;

In this case the statement b = 42 will always be executed, while the logging statement will be executed conditionally.

if (a > 0) {
    console.log("a > 0");
    b = 42;
}

ensures that the proper code will be executed conditionally no matter how many statements are added or removed.

Loading history...
9
mediaValueKeywords:u,propertyKeywords:p,nonStandardPropertyKeywords:h,colorKeywords:b,valueKeywords:k,fontProperties:g,allowNested:!0,tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=n,n(e,t)):["operator","operator"]},"@":function(e){return e.eat("{")?[null,"interpolation"]:!e.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/,!1)&&(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),e.defineMIME("text/x-gss",{documentTypes:i,mediaTypes:a,mediaFeatures:l,propertyKeywords:p,nonStandardPropertyKeywords:h,fontProperties:g,counterDescriptors:y,colorKeywords:b,valueKeywords:k,supportsAtComponent:!0,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=n,n(e,t))}},name:"css",helperType:"gss"})})},function(e,t,n){!function(e){e(n(3),n(43),n(42),n(40))}(function(e){"use strict";function t(e,t,n){var r=e.current(),i=r.search(t);return i>-1?e.backUp(r.length-i):r.match(/<\/?$/)&&(e.backUp(r.length),e.match(t,!1)||e.match(r)),n}function n(e){var t=l[e];return t?t:l[e]=new RegExp("\\s+"+e+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*")}function r(e,t){var r=e.match(n(t));return r?/^\s*(.*?)\s*$/.exec(r[2])[1]:""}function i(e,t){return new RegExp((t?"^":"")+"</s*"+e+"s*>","i")}function o(e,t){for(var n in e)for(var r=t[n]||(t[n]=[]),i=e[n],o=i.length-1;o>=0;o--)r.unshift(i[o])}function a(e,t){for(var n=0;n<e.length;n++){var i=e[n];if(!i[0]||i[1].test(r(t,i[0])))return i[2]}}var s={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^$/i,"javascript"],["type",/./,"text/plain"],[null,null,"javascript"]],style:[["lang",/^css$/i,"css"],["type",/^(text\/)?(x-)?(stylesheet|css)$/i,"css"],["type",/./,"text/plain"],[null,null,"css"]]},l={};e.defineMode("htmlmixed",function(n,r){function l(r,o){var s,f=c.token(r,o.htmlState),p=/\btag\b/.test(f);if(p&&!/[<>\s\/]/.test(r.current())&&(s=o.htmlState.tagName&&o.htmlState.tagName.toLowerCase())&&u.hasOwnProperty(s))o.inTag=s+" ";else if(o.inTag&&p&&/>$/.test(r.current())){var d=/^([\S]+) (.*)/.exec(o.inTag);o.inTag=null;var h=">"==r.current()&&a(u[d[1]],d[2]),m=e.getMode(n,h),g=i(d[1],!0),v=i(d[1],!1);o.token=function(e,n){return e.match(g,!1)?(n.token=l,n.localState=n.localMode=null,null):t(e,v,n.localMode.token(e,n.localState))},o.localMode=m,o.localState=e.startState(m,c.indent(o.htmlState,""))}else o.inTag&&(o.inTag+=r.current(),r.eol()&&(o.inTag+=" "));return f}var c=e.getMode(n,{name:"xml",htmlMode:!0,multilineTagIndentFactor:r.multilineTagIndentFactor,multilineTagIndentPastTag:r.multilineTagIndentPastTag}),u={},f=r&&r.tags,p=r&&r.scriptTypes;if(o(s,u),f&&o(f,u),p)for(var d=p.length-1;d>=0;d--)u.script.unshift(["type",p[d].matches,p[d].mode]);return{startState:function(){var t=e.startState(c);return{token:l,inTag:null,localMode:null,localState:null,htmlState:t}},copyState:function(t){var n;return t.localState&&(n=e.copyState(t.localMode,t.localState)),{token:t.token,inTag:t.inTag,localMode:t.localMode,localState:n,htmlState:e.copyState(c,t.htmlState)}},token:function(e,t){return t.token(e,t)},indent:function(t,n){return!t.localMode||/^\s*<\//.test(n)?c.indent(t.htmlState,n):t.localMode.indent?t.localMode.indent(t.localState,n):e.Pass},innerMode:function(e){return{state:e.localState||e.htmlState,mode:e.localMode||c}}}},"xml","javascript","css"),e.defineMIME("text/html","htmlmixed")})},function(e,t,n){!function(e){e(n(3))}(function(e){"use strict";function t(e,t,n){return/^(?:operator|sof|keyword c|case|new|export|default|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(n||0)))}e.defineMode("javascript",function(n,r){function i(e){for(var t,n=!1,r=!1;null!=(t=e.next());){if(!n){if("/"==t&&!r)return;"["==t?r=!0:r&&"]"==t&&(r=!1)}n=!n&&"\\"==t}}function o(e,t,n){return Se=e,Te=n,t}function a(e,n){var r=e.next();if('"'==r||"'"==r)return n.tokenize=s(r),n.tokenize(e,n);if("."==r&&e.match(/^\d+(?:[eE][+\-]?\d+)?/))return o("number","number");if("."==r&&e.match(".."))return o("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(r))return o(r);if("="==r&&e.eat(">"))return o("=>","operator");if("0"==r&&e.eat(/x/i))return e.eatWhile(/[\da-f]/i),o("number","number");if("0"==r&&e.eat(/o/i))return e.eatWhile(/[0-7]/i),o("number","number");if("0"==r&&e.eat(/b/i))return e.eatWhile(/[01]/i),o("number","number");if(/\d/.test(r))return e.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/),o("number","number");if("/"==r)return e.eat("*")?(n.tokenize=l,l(e,n)):e.eat("/")?(e.skipToEnd(),o("comment","comment")):t(e,n,1)?(i(e),e.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/),o("regexp","string-2")):(e.eatWhile(Ne),o("operator","operator",e.current()));if("`"==r)return n.tokenize=c,c(e,n);if("#"==r)return e.skipToEnd(),o("error","error");if(Ne.test(r))return">"==r&&n.lexical&&">"==n.lexical.type||e.eatWhile(Ne),o("operator","operator",e.current());if(Ee.test(r)){e.eatWhile(Ee);var a=e.current(),u=De.propertyIsEnumerable(a)&&De[a];return u&&"."!=n.lastType?o(u.type,u.style,a):o("variable","variable",a)}}function s(e){return function(t,n){var r,i=!1;if(Le&&"@"==t.peek()&&t.match(je))return n.tokenize=a,o("jsonld-keyword","meta");for(;null!=(r=t.next())&&(r!=e||i);)i=!i&&"\\"==r;return i||(n.tokenize=a),o("string","string")}}function l(e,t){for(var n,r=!1;n=e.next();){if("/"==n&&r){t.tokenize=a;break}r="*"==n}return o("comment","comment")}function c(e,t){for(var n,r=!1;null!=(n=e.next());){if(!r&&("`"==n||"$"==n&&e.eat("{"))){t.tokenize=a;break}r=!r&&"\\"==n}return o("quasi","string-2",e.current())}function u(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var n=e.string.indexOf("=>",e.start);if(!(n<0)){if(Oe){var r=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,n));r&&(n=r.index)}for(var i=0,o=!1,a=n-1;a>=0;--a){var s=e.string.charAt(a),l=Pe.indexOf(s);if(l>=0&&l<3){if(!i){++a;break}if(0==--i){"("==s&&(o=!0);break}}else if(l>=3&&l<6)++i;else if(Ee.test(s))o=!0;else{if(/["'\/]/.test(s))return;if(o&&!i){++a;break}}}o&&!i&&(t.fatArrowAt=a)}}function f(e,t,n,r,i,o){this.indented=e,this.column=t,this.type=n,this.prev=i,this.info=o,null!=r&&(this.align=r)}function p(e,t){for(var n=e.localVars;n;n=n.next)if(n.name==t)return!0;for(var r=e.context;r;r=r.prev)for(var n=r.vars;n;n=n.next)if(n.name==t)return!0}function d(e,t,n,r,i){var o=e.cc;for(Re.state=e,Re.stream=i,Re.marked=null,Re.cc=o,Re.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;){var a=o.length?o.pop():Fe?_:k;if(a(n,r)){for(;o.length&&o[o.length-1].lex;)o.pop()();return Re.marked?Re.marked:"variable"==n&&p(e,r)?"variable-2":t}}}function h(){for(var e=arguments.length-1;e>=0;e--)Re.cc.push(arguments[e])}function m(){return h.apply(null,arguments),!0}function g(e){function t(t){for(var n=t;n;n=n.next)if(n.name==e)return!0;return!1}var n=Re.state;if(Re.marked="def",n.context){if(t(n.localVars))return;n.localVars={name:e,next:n.localVars}}else{if(t(n.globalVars))return;r.globalVars&&(n.globalVars={name:e,next:n.globalVars})}}function v(){Re.state.context={prev:Re.state.context,vars:Re.state.localVars},Re.state.localVars=qe}function y(){Re.state.localVars=Re.state.context.vars,Re.state.context=Re.state.context.prev}function x(e,t){var n=function(){var n=Re.state,r=n.indented;if("stat"==n.lexical.type)r=n.lexical.indented;else for(var i=n.lexical;i&&")"==i.type&&i.align;i=i.prev)r=i.indented;n.lexical=new f(r,Re.stream.column(),e,null,n.lexical,t)};return n.lex=!0,n}function b(){var e=Re.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function w(e){function t(n){return n==e?m():";"==e?h():m(t)}return t}function k(e,t){return"var"==e?m(x("vardef",t.length),Q,w(";"),b):"keyword a"==e?m(x("form"),S,k,b):"keyword b"==e?m(x("form"),k,b):"{"==e?m(x("}"),K,b):";"==e?m():"if"==e?("else"==Re.state.lexical.info&&Re.state.cc[Re.state.cc.length-1]==b&&Re.state.cc.pop()(),m(x("form"),S,k,b,re)):"function"==e?m(ce):"for"==e?m(x("form"),ie,k,b):"variable"==e?m(x("stat"),R):"switch"==e?m(x("form"),S,x("}","switch"),w("{"),K,b,b):"case"==e?m(_,w(":")):"default"==e?m(w(":")):"catch"==e?m(x("form"),v,w("("),ue,w(")"),k,b,y):"class"==e?m(x("form"),pe,b):"export"==e?m(x("stat"),ge,b):"import"==e?m(x("stat"),ye,b):"module"==e?m(x("form"),Z,x("}"),w("{"),K,b,b):"type"==e?m(V,w("operator"),V,w(";")):"async"==e?m(k):h(x("stat"),_,w(";"),b)}function _(e){return T(e,!1)}function C(e){return T(e,!0)}function S(e){return"("!=e?h():m(x(")"),_,w(")"),b)}function T(e,t){if(Re.state.fatArrowAt==Re.stream.start){var n=t?N:D;if("("==e)return m(v,x(")"),W(Z,")"),b,w("=>"),n,y);if("variable"==e)return h(v,Z,w("=>"),n,y)}var r=t?F:L;return Ie.hasOwnProperty(e)?m(r):"function"==e?m(ce,r):"class"==e?m(x("form"),fe,b):"keyword c"==e||"async"==e?m(t?M:A):"("==e?m(x(")"),A,w(")"),b,r):"operator"==e||"spread"==e?m(t?C:_):"["==e?m(x("]"),_e,b,r):"{"==e?$(B,"}",null,r):"quasi"==e?h(O,r):"new"==e?m(j(t)):m()}function A(e){return e.match(/[;\}\)\],]/)?h():h(_)}function M(e){return e.match(/[;\}\)\],]/)?h():h(C)}function L(e,t){return","==e?m(_):F(e,t,!1)}function F(e,t,n){var r=0==n?L:F,i=0==n?_:C;return"=>"==e?m(v,n?N:D,y):"operator"==e?/\+\+|--/.test(t)?m(r):"?"==t?m(_,w(":"),i):m(i):"quasi"==e?h(O,r):";"!=e?"("==e?$(C,")","call",r):"."==e?m(q,r):"["==e?m(x("]"),A,w("]"),b,r):void 0:void 0}function O(e,t){return"quasi"!=e?h():"${"!=t.slice(t.length-2)?m(O):m(_,E)}function E(e){if("}"==e)return Re.marked="string-2",Re.state.tokenize=c,m(O)}function D(e){return u(Re.stream,Re.state),h("{"==e?k:_)}function N(e){return u(Re.stream,Re.state),h("{"==e?k:C)}function j(e){return function(t){return"."==t?m(e?I:P):h(e?C:_)}}function P(e,t){if("target"==t)return Re.marked="keyword",m(L)}function I(e,t){if("target"==t)return Re.marked="keyword",m(F)}function R(e){return":"==e?m(b,k):h(L,w(";"),b)}function q(e){if("variable"==e)return Re.marked="property",m()}function B(e,t){return"async"==e?(Re.marked="property",m(B)):"variable"==e||"keyword"==Re.style?(Re.marked="property",m("get"==t||"set"==t?z:H)):"number"==e||"string"==e?(Re.marked=Le?"property":Re.style+" property",m(H)):"jsonld-keyword"==e?m(H):"modifier"==e?m(B):"["==e?m(_,w("]"),H):"spread"==e?m(_):":"==e?h(H):void 0}function z(e){return"variable"!=e?h(H):(Re.marked="property",m(ce))}function H(e){return":"==e?m(C):"("==e?h(ce):void 0}function W(e,t,n){function r(i,o){if(n?n.indexOf(i)>-1:","==i){var a=Re.state.lexical;return"call"==a.info&&(a.pos=(a.pos||0)+1),m(function(n,r){return n==t||r==t?h():h(e)},r)}return i==t||o==t?m():m(w(t))}return function(n,i){return n==t||i==t?m():h(e,r)}}function $(e,t,n){for(var r=3;r<arguments.length;r++)Re.cc.push(arguments[r]);return m(x(t,n),W(e,t),b)}function K(e){return"}"==e?m():h(k,K)}function U(e,t){if(Oe){if(":"==e)return m(V);if("?"==t)return m(U)}}function V(e){return"variable"==e?(Re.marked="variable-3",m(J)):"string"==e||"number"==e||"atom"==e?m(J):"{"==e?m(x("}"),W(X,"}",",;"),b):"("==e?m(W(Y,")"),G):void 0}function G(e){if("=>"==e)return m(V)}function X(e,t){return"variable"==e||"keyword"==Re.style?(Re.marked="property",m(X)):"?"==t?m(X):":"==e?m(V):void 0}function Y(e){return"variable"==e?m(Y):":"==e?m(V):void 0}function J(e,t){return"<"==t?m(x(">"),W(V,">"),b,J):"|"==t||"."==e?m(V):"["==e?m(w("]"),J):void 0}function Q(){return h(Z,U,te,ne)}function Z(e,t){return"modifier"==e?m(Z):"variable"==e?(g(t),m()):"spread"==e?m(Z):"["==e?$(Z,"]"):"{"==e?$(ee,"}"):void 0}function ee(e,t){return"variable"!=e||Re.stream.match(/^\s*:/,!1)?("variable"==e&&(Re.marked="property"),"spread"==e?m(Z):"}"==e?h():m(w(":"),Z,te)):(g(t),m(te))}function te(e,t){if("="==t)return m(C)}function ne(e){if(","==e)return m(Q)}function re(e,t){if("keyword b"==e&&"else"==t)return m(x("form","else"),k,b)}function ie(e){if("("==e)return m(x(")"),oe,w(")"),b)}function oe(e){return"var"==e?m(Q,w(";"),se):";"==e?m(se):"variable"==e?m(ae):h(_,w(";"),se)}function ae(e,t){return"in"==t||"of"==t?(Re.marked="keyword",m(_)):m(L,se)}function se(e,t){return";"==e?m(le):"in"==t||"of"==t?(Re.marked="keyword",m(_)):h(_,w(";"),le)}function le(e){")"!=e&&m(_)}function ce(e,t){return"*"==t?(Re.marked="keyword",m(ce)):"variable"==e?(g(t),m(ce)):"("==e?m(v,x(")"),W(ue,")"),b,U,k,y):void 0}function ue(e){return"spread"==e?m(ue):h(Z,U,te)}function fe(e,t){return"variable"==e?pe(e,t):de(e,t)}function pe(e,t){if("variable"==e)return g(t),m(de)}function de(e,t){return"extends"==t||"implements"==t?m(Oe?V:_,de):"{"==e?m(x("}"),he,b):void 0}function he(e,t){return"variable"==e||"keyword"==Re.style?("static"==t||"get"==t||"set"==t||Oe&&("public"==t||"private"==t||"protected"==t||"readonly"==t||"abstract"==t))&&Re.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(Re.marked="keyword",m(he)):(Re.marked="property",m(Oe?me:ce,he)):"*"==t?(Re.marked="keyword",m(he)):";"==e?m(he):"}"==e?m():void 0}function me(e,t){return"?"==t?m(me):":"==e?m(V,te):h(ce)}function ge(e,t){return"*"==t?(Re.marked="keyword",m(ke,w(";"))):"default"==t?(Re.marked="keyword",m(_,w(";"))):"{"==e?m(W(ve,"}"),ke,w(";")):h(k)}function ve(e,t){return"as"==t?(Re.marked="keyword",m(w("variable"))):"variable"==e?h(C,ve):void 0}function ye(e){return"string"==e?m():h(xe,be,ke)}function xe(e,t){return"{"==e?$(xe,"}"):("variable"==e&&g(t),"*"==t&&(Re.marked="keyword"),m(we))}function be(e){if(","==e)return m(xe,be)}function we(e,t){if("as"==t)return Re.marked="keyword",m(xe)}function ke(e,t){if("from"==t)return Re.marked="keyword",m(_)}function _e(e){return"]"==e?m():h(W(C,"]"))}function Ce(e,t){return"operator"==e.lastType||","==e.lastType||Ne.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}var Se,Te,Ae=n.indentUnit,Me=r.statementIndent,Le=r.jsonld,Fe=r.json||Le,Oe=r.typescript,Ee=r.wordCharacters||/[\w$\xa1-\uffff]/,De=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),n=e("keyword b"),r=e("keyword c"),i=e("operator"),o={type:"atom",style:"atom"},a={if:e("if"),while:t,with:t,else:n,do:n,try:n,finally:n,return:r,break:r,continue:r,new:e("new"),delete:r,throw:r,debugger:r,var:e("var"),const:e("var"),let:e("var"),function:e("function"),catch:e("catch"),for:e("for"),switch:e("switch"),case:e("case"),default:e("default"),in:i,typeof:i,instanceof:i,true:o,false:o,null:o,undefined:o,NaN:o,Infinity:o,this:e("this"),class:e("class"),super:e("atom"),yield:r,export:e("export"),import:e("import"),extends:r,await:r,async:e("async")};if(Oe){var s={type:"variable",style:"variable-3"},l={interface:e("class"),implements:r,namespace:r,module:e("module"),enum:e("module"),type:e("type"),public:e("modifier"),private:e("modifier"),protected:e("modifier"),abstract:e("modifier"),as:i,string:s,number:s,boolean:s,any:s};for(var c in l)a[c]=l[c]}return a}(),Ne=/[+\-*&%=<>!?|~^]/,je=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/,Pe="([{}])",Ie={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0},Re={state:null,column:null,marked:null,cc:null},qe={name:"this",next:{name:"arguments"}};return b.lex=!0,{startState:function(e){var t={tokenize:a,lastType:"sof",cc:[],lexical:new f((e||0)-Ae,0,"block",!1),localVars:r.localVars,context:r.localVars&&{vars:r.localVars},indented:e||0};return r.globalVars&&"object"==typeof r.globalVars&&(t.globalVars=r.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),u(e,t)),t.tokenize!=l&&e.eatSpace())return null;var n=t.tokenize(e,t);return"comment"==Se?n:(t.lastType="operator"!=Se||"++"!=Te&&"--"!=Te?Se:"incdec",d(t,n,Se,Te,e))},indent:function(t,n){if(t.tokenize==l)return e.Pass;if(t.tokenize!=a)return 0;var i,o=n&&n.charAt(0),s=t.lexical;if(!/^\s*else\b/.test(n))for(var c=t.cc.length-1;c>=0;--c){var u=t.cc[c];if(u==b)s=s.prev;else if(u!=re)break}for(;("stat"==s.type||"form"==s.type)&&("}"==o||(i=t.cc[t.cc.length-1])&&(i==L||i==F)&&!/^[,\.=+\-*:?[\(]/.test(n));)s=s.prev;Me&&")"==s.type&&"stat"==s.prev.type&&(s=s.prev);var f=s.type,p=o==f;return"vardef"==f?s.indented+("operator"==t.lastType||","==t.lastType?s.info+1:0):"form"==f&&"{"==o?s.indented:"form"==f?s.indented+Ae:"stat"==f?s.indented+(Ce(t,n)?Me||Ae:0):"switch"!=s.info||p||0==r.doubleIndentSwitch?s.align?s.column+(p?0:1):s.indented+(p?0:Ae):s.indented+(/^(?:case|default)\b/.test(n)?Ae:2*Ae)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:Fe?null:"/*",blockCommentEnd:Fe?null:"*/",lineComment:Fe?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:Fe?"json":"javascript",jsonldMode:Le,jsonMode:Fe,expressionAllowed:t,skipExpression:function(e){var t=e.cc[e.cc.length-1];t!=_&&t!=C||e.cc.pop()}}}),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})})},function(e,t,n){!function(e){e(n(3))}(function(e){"use strict";var t={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},n={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,caseFold:!1};e.defineMode("xml",function(r,i){function o(e,t){function n(n){return t.tokenize=n,n(e,t)}var r=e.next();if("<"==r)return e.eat("!")?e.eat("[")?e.match("CDATA[")?n(l("atom","]]>")):null:e.match("--")?n(l("comment","-->")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),n(c(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=l("meta","?>"),"meta"):(T=e.eat("/")?"closeTag":"openTag",t.tokenize=a,"tag bracket");if("&"==r){var i;return i=e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"),i?"atom":"error"}return e.eatWhile(/[^&<]/),null}function a(e,t){var n=e.next();if(">"==n||"/"==n&&e.eat(">"))return t.tokenize=o,T=">"==n?"endTag":"selfcloseTag","tag bracket";if("="==n)return T="equals",null;if("<"==n){t.tokenize=o,t.state=d,t.tagName=t.tagStart=null;var r=t.tokenize(e,t);return r?r+" tag error":"tag error"}return/[\'\"]/.test(n)?(t.tokenize=s(n),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function s(e){var t=function(t,n){for(;!t.eol();)if(t.next()==e){n.tokenize=a;break}return"string"};return t.isInAttribute=!0,t}function l(e,t){return function(n,r){for(;!n.eol();){if(n.match(t)){r.tokenize=o;break}n.next()}return e}}function c(e){return function(t,n){for(var r;null!=(r=t.next());){if("<"==r)return n.tokenize=c(e+1),n.tokenize(t,n);if(">"==r){if(1==e){n.tokenize=o;break}return n.tokenize=c(e-1),n.tokenize(t,n)}}return"meta"}}function u(e,t,n){this.prev=e.context,this.tagName=t,this.indent=e.indented,this.startOfLine=n,(_.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function f(e){e.context&&(e.context=e.context.prev)}function p(e,t){for(var n;;){if(!e.context)return;if(n=e.context.tagName,!_.contextGrabbers.hasOwnProperty(n)||!_.contextGrabbers[n].hasOwnProperty(t))return;f(e)}}function d(e,t,n){return"openTag"==e?(n.tagStart=t.column(),h):"closeTag"==e?m:d}function h(e,t,n){return"word"==e?(n.tagName=t.current(),A="tag",y):(A="error",h)}function m(e,t,n){if("word"==e){var r=t.current();return n.context&&n.context.tagName!=r&&_.implicitlyClosed.hasOwnProperty(n.context.tagName)&&f(n),n.context&&n.context.tagName==r||_.matchClosing===!1?(A="tag",g):(A="tag error",v)}return A="error",v}function g(e,t,n){return"endTag"!=e?(A="error",g):(f(n),d)}function v(e,t,n){return A="error",g(e,t,n)}function y(e,t,n){if("word"==e)return A="attribute",x;if("endTag"==e||"selfcloseTag"==e){var r=n.tagName,i=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==e||_.autoSelfClosers.hasOwnProperty(r)?p(n,r):(p(n,r),n.context=new u(n,r,i==n.indented)),d}return A="error",y}function x(e,t,n){return"equals"==e?b:(_.allowMissing||(A="error"),y(e,t,n))}function b(e,t,n){return"string"==e?w:"word"==e&&_.allowUnquoted?(A="string",y):(A="error",y(e,t,n))}function w(e,t,n){return"string"==e?w:y(e,t,n)}var k=r.indentUnit,_={},C=i.htmlMode?t:n;for(var S in C)_[S]=C[S];for(var S in i)_[S]=i[S];var T,A;return o.isInText=!0,{startState:function(e){var t={tokenize:o,state:d,indented:e||0,tagName:null,tagStart:null,context:null};return null!=e&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;T=null;var n=t.tokenize(e,t);return(n||T)&&"comment"!=n&&(A=null,t.state=t.state(T||n,e,t),A&&(n="error"==A?n+" error":A)),n},indent:function(t,n,r){var i=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+k;if(i&&i.noIndent)return e.Pass;if(t.tokenize!=a&&t.tokenize!=o)return r?r.match(/^(\s*)/)[0].length:0;if(t.tagName)return _.multilineTagIndentPastTag!==!1?t.tagStart+t.tagName.length+2:t.tagStart+k*(_.multilineTagIndentFactor||1);if(_.alignCDATA&&/<!\[CDATA\[/.test(n))return 0;var s=n&&/^<(\/)?([\w_:\.-]*)/.exec(n);if(s&&s[1])for(;i;){if(i.tagName==s[2]){i=i.prev;break}if(!_.implicitlyClosed.hasOwnProperty(i.tagName))break;i=i.prev}else if(s)for(;i;){var l=_.contextGrabbers[i.tagName];if(!l||!l.hasOwnProperty(s[2]))break;i=i.prev}for(;i&&i.prev&&!i.startOfLine;)i=i.prev;return i?i.indent+k:t.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:_.htmlMode?"html":"xml",helperType:_.htmlMode?"html":"xml",skipAttribute:function(e){e.state==b&&(e.state=y)}}}),e.defineMIME("text/xml","xml"),e.defineMIME("application/xml","xml"),e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})})},function(e,t,n){var r,i;r=[n(0)],i=function(e){"use strict";return e.now()}.apply(t,r),!(void 0!==i&&(e.exports=i))},function(e,t,n){var r;r=function(){"use strict";return/\?/}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r,i;r=[n(0),n(9),n(19),n(2)],i=function(e,t,n){"use strict";var r=/^(?:input|select|textarea|button)$/i,i=/^(?:a|area)$/i;e.fn.extend({prop:function(n,r){return t(this,e.prop,n,r,arguments.length>1)},removeProp:function(t){return this.each(function(){delete this[e.propFix[t]||t]})}}),e.extend({prop:function(t,n,r){var i,o,a=t.nodeType;if(3!==a&&8!==a&&2!==a)return 1===a&&e.isXMLDoc(t)||(n=e.propFix[n]||n,o=e.propHooks[n]),void 0!==r?o&&"set"in o&&void 0!==(i=o.set(t,r,n))?i:t[n]=r:o&&"get"in o&&null!==(i=o.get(t,n))?i:t[n]},propHooks:{tabIndex:{get:function(t){var n=e.find.attr(t,"tabindex");return n?parseInt(n,10):r.test(t.nodeName)||i.test(t.nodeName)&&t.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),n.optSelected||(e.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),e.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){e.propFix[this.toLowerCase()]=this})}.apply(t,r),!(void 0!==i&&(e.exports=i))},function(e,t,n){var r,i;r=[n(1)],i=function(e){"use strict";function t(t,n){n=n||e;var r=n.createElement("script");r.text=t,n.head.appendChild(r).parentNode.removeChild(r)}return t}.apply(t,r),!(void 0!==i&&(e.exports=i))},function(e,t,n){var r,i;r=[n(0),n(1),n(105),n(12)],i=function(e,t){"use strict";function n(){t.removeEventListener("DOMContentLoaded",n),window.removeEventListener("load",n),e.ready()}var r=e.Deferred();e.fn.ready=function(t){return r.then(t).catch(function(t){e.readyException(t)}),this},e.extend({isReady:!1,readyWait:1,holdReady:function(t){t?e.readyWait++:e.ready(!0)},ready:function(n){(n===!0?--e.readyWait:e.isReady)||(e.isReady=!0,n!==!0&&--e.readyWait>0||r.resolveWith(t,[e]))}}),e.ready.then=r.then,"complete"===t.readyState||"loading"!==t.readyState&&!t.documentElement.doScroll?window.setTimeout(e.ready):(t.addEventListener("DOMContentLoaded",n),window.addEventListener("load",n))}.apply(t,r),!(void 0!==i&&(e.exports=i))},function(e,t,n){var r;r=function(){"use strict";return/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";function e(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}return e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r,i;r=[n(0),n(33)],i=function(e,t){"use strict";function n(n,r,i,o){var a,s=1,l=20,c=o?function(){return o.cur()}:function(){return e.css(n,r,"")},u=c(),f=i&&i[3]||(e.cssNumber[r]?"":"px"),p=(e.cssNumber[r]||"px"!==f&&+u)&&t.exec(e.css(n,r));if(p&&p[3]!==f){f=f||p[3],i=i||[],p=+u||1;do s=s||".5",p/=s,e.style(n,r,p+f);while(s!==(s=c()/u)&&1!==s&&--l)}return i&&(p=+p||+u||0,a=i[1]?p+(i[1]+1)*i[2]:+i[2],o&&(o.unit=f,o.start=p,o.end=a)),a}return n}.apply(t,r),!(void 0!==i&&(e.exports=i))},function(e,t,n){var r,i;r=[n(0),n(23),n(56),n(54),n(22),n(2)],i=function(e,t,n,r,i){"use strict";function o(o,a,s){var l,c,u,f,p=o.style;return s=s||r(o),s&&(f=s.getPropertyValue(a)||s[a],""!==f||e.contains(o.ownerDocument,o)||(f=e.style(o,a)),!i.pixelMarginRight()&&t.test(f)&&n.test(a)&&(l=p.width,c=p.minWidth,u=p.maxWidth,p.minWidth=p.maxWidth=p.width=f,f=s.width,p.width=l,p.minWidth=c,p.maxWidth=u)),void 0!==f?f+"":f}return o}.apply(t,r),!(void 0!==i&&(e.exports=i))},function(e,t,n){var r;r=function(){"use strict";return["Top","Right","Bottom","Left"]}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";return function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=window),t.getComputedStyle(e)}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r,i;r=[n(0),n(2)],i=function(e){"use strict";return function(t,n){return t=n||t,"none"===t.style.display||""===t.style.display&&e.contains(t.ownerDocument,t)&&"none"===e.css(t,"display")}}.apply(t,r),!(void 0!==i&&(e.exports=i))},function(e,t,n){var r;r=function(){"use strict";return/^margin/}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";return function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r,i;r=[n(0),n(7),n(24)],i=function(e,t,n){"use strict";function r(){this.expando=e.expando+r.uid++}return r.uid=1,r.prototype={cache:function(e){var t=e[this.expando];return t||(t={},n(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(t,n,r){var i,o=this.cache(t);if("string"==typeof n)o[e.camelCase(n)]=r;else for(i in n)o[e.camelCase(i)]=n[i];return o},get:function(t,n){return void 0===n?this.cache(t):t[this.expando]&&t[this.expando][e.camelCase(n)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(n,r){var i,o=n[this.expando];if(void 0!==o){if(void 0!==r){e.isArray(r)?r=r.map(e.camelCase):(r=e.camelCase(r),r=r in o?[r]:r.match(t)||[]),i=r.length;for(;i--;)delete o[r[i]]}(void 0===r||e.isEmptyObject(o))&&(n.nodeType?n[this.expando]=void 0:delete n[this.expando])}},hasData:function(t){var n=t[this.expando];return void 0!==n&&!e.isEmptyObject(n)}},r}.apply(t,r),!(void 0!==i&&(e.exports=i))},function(e,t,n){var r,i;r=[n(58)],i=function(e){"use strict";return new e}.apply(t,r),!(void 0!==i&&(e.exports=i))},function(e,t,n){var r,i;r=[n(0),n(65),n(64),n(66),n(61),n(62)],i=function(e,t,n,r,i,o){"use strict";function a(a,l,c,u,f){for(var p,d,h,m,g,v,y=l.createDocumentFragment(),x=[],b=0,w=a.length;b<w;b++)if(p=a[b],p||0===p)if("object"===e.type(p))e.merge(x,p.nodeType?[p]:p);else if(s.test(p)){for(d=d||y.appendChild(l.createElement("div")),h=(t.exec(p)||["",""])[1].toLowerCase(),m=r[h]||r._default,d.innerHTML=m[1]+e.htmlPrefilter(p)+m[2],v=m[0];v--;)d=d.lastChild;e.merge(x,d.childNodes),d=y.firstChild,d.textContent=""}else x.push(l.createTextNode(p));for(y.textContent="",b=0;p=x[b++];)if(u&&e.inArray(p,u)>-1)f&&f.push(p);else if(g=e.contains(p.ownerDocument,p),d=i(y.appendChild(p),"script"),g&&o(d),c)for(v=0;p=d[v++];)n.test(p.type||"")&&c.push(p);return y}var s=/<|&#?\w+;/;return a}.apply(t,r),!(void 0!==i&&(e.exports=i))},function(e,t,n){var r,i;r=[n(0)],i=function(e){"use strict";function t(t,n){var r;return r="undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(n||"*"):"undefined"!=typeof t.querySelectorAll?t.querySelectorAll(n||"*"):[],void 0===n||n&&e.nodeName(t,n)?e.merge([t],r):r}return t}.apply(t,r),!(void 0!==i&&(e.exports=i))},function(e,t,n){var r,i;r=[n(5)],i=function(e){"use strict";function t(t,n){for(var r=0,i=t.length;r<i;r++)e.set(t[r],"globalEval",!n||e.get(n[r],"globalEval"))}return t}.apply(t,r),!(void 0!==i&&(e.exports=i))},function(e,t,n){var r;r=function(){"use strict";return/^(?:checkbox|radio)$/i}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";return/^$|\/(?:java|ecma)script/i}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";return/<([a-z][^\/\0>\x20\t\r\n\f]+)/i}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r;r=function(){"use strict";var e={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};return e.optgroup=e.option,e.tbody=e.tfoot=e.colgroup=e.caption=e.thead,e.th=e.td,e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r,i;r=[n(0),n(63),n(4),n(14),n(46)],i=function(e,t){"use strict";function n(t,i,o,a){var s;if(e.isArray(i))e.each(i,function(e,i){o||r.test(t)?a(t,i):n(t+"["+("object"==typeof i&&null!=i?e:"")+"]",i,o,a)});else if(o||"object"!==e.type(i))a(t,i);else for(s in i)n(t+"["+s+"]",i[s],o,a)}var r=/\[\]$/,i=/\r?\n/g,o=/^(?:submit|button|image|reset|file)$/i,a=/^(?:input|select|textarea|keygen)/i;return e.param=function(t,r){var i,o=[],a=function(t,n){var r=e.isFunction(n)?n():n;o[o.length]=encodeURIComponent(t)+"="+encodeURIComponent(null==r?"":r)};if(e.isArray(t)||t.jquery&&!e.isPlainObject(t))e.each(t,function(){a(this.name,this.value)});else for(i in t)n(i,t[i],r,a);return o.join("&")},e.fn.extend({serialize:function(){return e.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var t=e.prop(this,"elements");return t?e.makeArray(t):this}).filter(function(){var n=this.type;return this.name&&!e(this).is(":disabled")&&a.test(this.nodeName)&&!o.test(n)&&(this.checked||!t.test(n))}).map(function(t,n){
0 ignored issues
show
Complexity Best Practice introduced by
There is no return statement if "}" == e is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Complexity Best Practice introduced by
There is no return statement if Ee.test(r) is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Bug introduced by
The variable i does not seem to be initialized in case 3 !== a && 8 !== a && 2 !== a on line 9 is true. Are you sure this can never be the case?
Loading history...
Coding Style Best Practice introduced by
By convention, constructors like e should be capitalized.
Loading history...
Complexity Best Practice introduced by
There is no return statement if "=" == t is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Complexity Best Practice introduced by
There is no return statement if "as" == t is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Comprehensibility introduced by
Usage of the sequence operator is discouraged, since it may lead to obfuscated code.

The sequence or comma operator allows the inclusion of multiple expressions where only is permitted. The result of the sequence is the value of the last expression.

This operator is most often used in for statements.

Used in another places it can make code hard to read, especially when people do not realize it even exists as a seperate operator.

This check looks for usage of the sequence operator in locations where it is not necessary and could be replaced by a series of expressions or statements.

var a,b,c;

a = 1, b = 1,  c= 3;

could just as well be written as:

var a,b,c;

a = 1;
b = 1;
c = 3;

To learn more about the sequence operator, please refer to the MDN.

Loading history...
Complexity Best Practice introduced by
There is no return statement if "target" == t is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Comprehensibility Naming Best Practice introduced by
The variable S already seems to be declared on line 9. Consider using another variable name or omitting the var keyword.

This check looks for variables that are declared in multiple lines. There may be several reasons for this.

In the simplest case the variable name was reused by mistake. This may lead to very hard to locate bugs.

If you want to reuse a variable for another purpose, consider declaring it at or near the top of your function and just assigning to it subsequently so it is always declared.

Loading history...
Coding Style Best Practice introduced by
By convention, constructors like u should be capitalized.
Loading history...
Bug introduced by
The variable n seems to not be initialized for all possible execution paths.
Loading history...
Bug introduced by
The variable f seems to not be initialized for all possible execution paths.
Loading history...
Coding Style introduced by
Consider using undefined instead of void(0). It is equivalent and more straightforward to read.
Loading history...
Complexity Best Practice introduced by
There is no return statement if "?" == t is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Complexity Best Practice introduced by
There is no return statement if Oe is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Complexity Best Practice introduced by
There is no return statement if "from" == t is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Complexity Best Practice introduced by
There is no return statement if "keyword b" == e && "else" == t is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Complexity introduced by
A for in loop automatically includes the property of any prototype object, consider checking the key using hasOwnProperty.

When iterating over the keys of an object, this includes not only the keys of the object, but also keys contained in the prototype of that object. It is generally a best practice to check for these keys specifically:

var someObject;
for (var key in someObject) {
    if ( ! someObject.hasOwnProperty(key)) {
        continue; // Skip keys from the prototype.
    }

    doSomethingWith(key);
}
Loading history...
Bug introduced by
The variable a seems to not be initialized for all possible execution paths.
Loading history...
Coding Style Best Practice introduced by
By convention, constructors like f should be capitalized.
Loading history...
Complexity Best Practice introduced by
There is no return statement if "=>" == e is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Complexity Best Practice introduced by
There is no return statement if 3 !== a && 8 !== a && 2 !== a is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Complexity Best Practice introduced by
There is no return statement if "(" == e is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Complexity Best Practice introduced by
There is no return statement if "," == e is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Comprehensibility Naming Best Practice introduced by
The variable n already seems to be declared on line 9. Consider using another variable name or omitting the var keyword.

This check looks for variables that are declared in multiple lines. There may be several reasons for this.

In the simplest case the variable name was reused by mistake. This may lead to very hard to locate bugs.

If you want to reuse a variable for another purpose, consider declaring it at or near the top of your function and just assigning to it subsequently so it is always declared.

Loading history...
Coding Style Best Practice introduced by
Curly braces around statements make for more readable code and help prevent bugs when you add further statements.

Consider adding curly braces around all statements when they are executed conditionally. This is optional if there is only one statement, but leaving them out can lead to unexpected behaviour if another statement is added later.

Consider:

if (a > 0)
    b = 42;

If you or someone else later decides to put another statement in, only the first statement will be executed.

if (a > 0)
    console.log("a > 0");
    b = 42;

In this case the statement b = 42 will always be executed, while the logging statement will be executed conditionally.

if (a > 0) {
    console.log("a > 0");
    b = 42;
}

ensures that the proper code will be executed conditionally no matter how many statements are added or removed.

Loading history...
Best Practice introduced by
There is no return statement in this branch, but you do return something in other branches. Did you maybe miss it? If you do not want to return anything, consider adding return undefined; explicitly.
Loading history...
Complexity Best Practice introduced by
There is no return statement if "variable" == e is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
10 View Code Duplication
var r=e(this).val();return null==r?null:e.isArray(r)?e.map(r,function(e){return{name:n.name,value:e.replace(i,"\r\n")}}):{name:n.name,value:r.replace(i,"\r\n")}}).get()}}),e}.apply(t,r),!(void 0!==i&&(e.exports=i))},function(e,t,n){var r,i;r=[n(0),n(31),n(69),n(2)],i=function(e,t,n){"use strict";function r(n,r,o){return e.isFunction(r)?e.grep(n,function(e,t){return!!r.call(e,t,e)!==o}):r.nodeType?e.grep(n,function(e){return e===r!==o}):"string"!=typeof r?e.grep(n,function(e){return t.call(r,e)>-1!==o}):i.test(r)?e.filter(r,n,o):(r=e.filter(r,n),e.grep(n,function(e){return t.call(r,e)>-1!==o&&1===e.nodeType}))}var i=/^.[^:#\[\.,]*$/;e.filter=function(t,n,r){var i=n[0];return r&&(t=":not("+t+")"),1===n.length&&1===i.nodeType?e.find.matchesSelector(i,t)?[i]:[]:e.find.matches(t,e.grep(n,function(e){return 1===e.nodeType}))},e.fn.extend({find:function(t){var n,r,i=this.length,o=this;if("string"!=typeof t)return this.pushStack(e(t).filter(function(){for(n=0;n<i;n++)if(e.contains(o[n],this))return!0}));for(r=this.pushStack([]),n=0;n<i;n++)e.find(t,o[n],r);return i>1?e.uniqueSort(r):r},filter:function(e){return this.pushStack(r(this,e||[],!1))},not:function(e){return this.pushStack(r(this,e||[],!0))},is:function(t){return!!r(this,"string"==typeof t&&n.test(t)?e(t):t||[],!1).length}})}.apply(t,r),!(void 0!==i&&(e.exports=i))},function(e,t,n){var r,i;r=[n(0),n(2)],i=function(e){"use strict";return e.expr.match.needsContext}.apply(t,r),!(void 0!==i&&(e.exports=i))},function(e,t,n){var r,i;r=[n(16)],i=function(e){"use strict";return e.concat}.apply(t,r),!(void 0!==i&&(e.exports=i))},function(e,t,n){var r,i;r=[n(30)],i=function(e){"use strict";return e.toString}.apply(t,r),!(void 0!==i&&(e.exports=i))},function(e,t,n){var r,i;r=[n(16)],i=function(e){"use strict";return e.push}.apply(t,r),!(void 0!==i&&(e.exports=i))},function(e,t,n){"use strict";(function(e){function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=n(18),o=(n.n(i),n(90)),a=(n.n(o),n(91)),s=(n.n(a),n(92)),l=(n.n(s),n(35),n(83)),c=n(82),u=n(75),f=n(76),p=n(77),d=n(78),h=n(79),m=n(80),g=n(81),v=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),y=function(){function t(n){var i=this,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r(this,t),this.$element=e(n),this.$parent=this.$element.parent(),this.$win=e(window),this.$term=null;var a=this.$parent.prop("tagName").toLowerCase();o.endPoint||(o.endPoint=o.endpoint),Object.assign(this,{options:Object.assign({},o),formatter:new l.a,prompt:"$ "}),this.$element.terminal(this.run.bind(this),{greetings:this.greetings(),onInit:function(e){i.$term=e,i.loading=new c.a(e),i.commands=[new d.a(i,o),new u.a(i,o),new f.a(i,o),new h.a(i,o),new m.a(i,o),new g.a(i,o),new p.a(i,o)],i.run("list")},onClear:function(){i.serverInfo()},prompt:this.prompt}),this.$win.on("resize",function(){if("body"===a){var e=i.$parent.width()-20,t=i.$parent.height()-20;i.$element.width(e),i.$element.height(t)}else i.scrollToBottom()}).trigger("resize"),this.$parent.on("click",function(){i.$term&&i.$term.focus()})}return v(t,[{key:"scrollToBottom",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:200;setTimeout(function(){e.$element.parent().animate({scrollTop:9e9})},t)}},{key:"run",value:function(t){for(var n in this.options.interpreters)if(t===n){var r=this.options.interpreters[n];return void this.interpreter(r)}for(var i=e.terminal.parseCommand(t.trim()),o=0;o<this.commands.length;o++){var a=this.commands[o];if(a.match(i.name)===!0){a.call(i);break}}}},{key:"interpreter",value:function(e){var t=this;this.$term.push(function(n){t.run(e.replace(/\s+/g,"-")+" "+n)},{prompt:e+"> "})}},{key:"greetings",value:function(){return[" __                        _    _____              _         _ ","|  |   ___ ___ ___ _ _ ___| |  |_   ____ ___ _____|_|___ ___| |","|  |__| .'|  _| .'| | | -_| |    | || -_|  _|     | |   | .'| |","|_____|__,|_| |__,|\\_/|___|_|    |_||___|_| |_|_|_|_|_|_|__,|_|","","Copyright (c) 2015 Recca Tsai <http://phpwrite.blogspot.tw/>","","Type a command, or type `"+this.info("help")+"`, for a list of commands.",""].join("\n")}},{key:"serverInfo",value:function(){if(!(this.$term.level()>1)){var e=""+this.info(this.options.username)+this.info("@")+this.info(this.options.hostname),t=this.question(""+this.options.os),n=this.comment(""+this.options.basePath);this.$term.echo(e+" "+t+" "+n),this.scrollToBottom()}}},{key:"error",value:function(e){return this.formatter.error(e)}},{key:"info",value:function(e){return this.formatter.info(e)}},{key:"comment",value:function(e){return this.formatter.comment(e)}},{key:"question",value:function(e){return this.formatter.question(e)}},{key:"echo",value:function(t){var n=this,r=new RegExp("(\\033\\[(\\d+)(;\\d+)?m(((?!\\033\\[\\d+).)*)\\033\\[(\\d+)(;\\d+)?m)|(\\[|\\])","g"),i=void 0;t=t.replace(r,function(){if(["[","]"].includes(arguments.length<=0?void 0:arguments[0])===!0)return e.terminal.escape_brackets(arguments.length<=0?void 0:arguments[0]);switch(i=e.terminal.escape_brackets(arguments.length<=4?void 0:arguments[4]),arguments.length<=2?void 0:arguments[2]){case"32":return n.info(i);case"33":return n.comment(i);case"37":return n.error(i);default:return arguments.length<=0?void 0:arguments[0]}}),t.split("\n").forEach(function(e){""===e&&(e=" "),n.$term.echo(e)})}},{key:"confirm",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return new Promise(function(r,i){var o=t.$term.history();o.disable(),""!=n&&t.$term.echo(n),t.$term.echo(e),t.scrollToBottom(),t.$term.push(function(e){t.toBoolean(e)===!0?r(!0):(i(!1),t.serverInfo()),t.$term.pop(),o.enable()},{prompt:" > "})})}},{key:"toBoolean",value:function(e){switch(e){case"y":case"yes":case"true":return!0;case"n":case"no":case"false":case"":return!1}return!1}}]),t}();window.Terminal=y}).call(t,n(6))},function(e,t){},function(e,t,n){"use strict";(function(e){function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(8),s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},c=function(t){function n(){return r(this,n),i(this,(n.__proto__||Object.getPrototypeOf(n)).apply(this,arguments))}return o(n,t),s(n,[{key:"match",value:function(e){return"artisan"===e}},{key:"call",value:function(t){var r=this,i=e.terminal.parseCommand(t.rest.trim());if("production"===this.api.options.environment&&i.args.includes("--force")===!1&&this.api.options.confirmToProceed[t.name].includes(i.name)===!0){this.api.$term.echo(this.api.comment("**************************************")),this.api.$term.echo(this.api.comment("*     Application In Production!     *")),this.api.$term.echo(this.api.comment("**************************************")),this.api.$term.echo(" ");var o=this.api.confirm(this.api.info("Do you really wish to run this command? [y/N] (yes/no)")+" "+this.api.comment("[no]")+": ");o.then(function(){t.command='artisan --command="'+r.addslashes(t.rest)+'"',l(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"call",r).call(r,t)},function(){r.$term.echo(" "),r.$term.echo(""+r.comment("Command Cancelled!")),r.$term.echo(" ")})}else t.command='artisan --command="'+this.addslashes(t.rest)+'"',l(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"call",this).call(this,t)}}]),n}(a.a);t.a=c}).call(t,n(6))},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(8),s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},c=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),s(t,[{key:"match",value:function(e){return"composer"===e}},{key:"call",value:function(e){e.command='composer --command="'+this.addslashes(e.rest)+'"',l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"call",this).call(this,e)}}]),t}(a.a);t.a=c},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(8),s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),s(t,[{key:"match",value:function(e){return["list","help"].includes(e)===!1}}]),t}(a.a);t.a=l},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(8),s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),s(t,[{key:"match",value:function(e){return["list","help"].includes(e)}},{key:"call",value:function(e){this.api.echo(this.api.options.helpInfo),this.api.serverInfo()}}]),t}(a.a);t.a=l},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(8),s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},c=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),s(t,[{key:"match",value:function(e){return"mysql"===e}},{key:"call",value:function(e){e.command='mysql --command="'+this.addslashes(e.rest)+'"',l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"call",this).call(this,e)}}]),t}(a.a);t.a=c},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(8),s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},c=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),s(t,[{key:"match",value:function(e){return"tinker"===e}},{key:"call",value:function(e){e.command='tinker --command="'+this.addslashes(e.rest)+'"',l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"call",this).call(this,e)}}]),t}(a.a);t.a=c},function(e,t,n){"use strict";(function(e){function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(8),s=n(3),l=n.n(s),c=n(36),u=(n.n(c),n(38)),f=(n.n(u),n(86)),p=(n.n(f),n(37)),d=(n.n(p),n(84)),h=(n.n(d),n(39)),m=(n.n(h),n(88)),g=(n.n(m),n(87)),v=(n.n(g),n(89)),y=(n.n(v),n(40)),x=(n.n(y),n(42)),b=(n.n(x),n(41)),w=(n.n(b),n(43)),k=(n.n(w),function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}()),_=function(t){function n(t){r(this,n);var o=i(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,t)),a=e('<textarea style="display: none;"></textarea>').appendTo(document.body).get(0);return o.editor=l.a.fromTextArea(a,{lineNumbers:!0,matchBrackets:!0,keyMap:"vim",showCursorWhenSelecting:!0,theme:"monokai"}),o.editor.getWrapperElement().className+=" CodeMirror-fullscreen",e(o.editor.getWrapperElement()).hide(),o}return o(n,t),k(n,[{key:"match",value:function(e){return"vi"===e}},{key:"call",value:function(t){var n=this;this.api.$term.pause(),this.makeRequest(t.command).then(function(r){var i=t.rest,o=n.editor,a=void 0,s=void 0,c=void 0,u=void 0;(a=i.match(/.+\.([^.]+)$/))?(s=l.a.findModeByExtension(a[1]),s&&(c=s.mode,u=s.mime)):/\//.test(i)&&(s=s=l.a.findModeByMIME(i),s&&(c=s.mode,u=s.mime)),["htmlmixed","css","javascript","php"].includes(c)===!1&&(c="php",u="application/x-httpd-php"),c&&(o.setOption("mode",u),l.a.autoLoadMode(o,c)),e(o.getWrapperElement()).show();var f=o.getDoc(),p=f.cm;f.setValue(r.result),f.setCursor(0),o.focus(),p.focus();var d=function(){var e=JSON.stringify(f.getValue());t.command+=" --text="+e,n.makeRequest(t.command).then(function(){},function(){})},h=function(){e(o.getWrapperElement()).hide(),n.api.$term.resume(),n.api.$term.focus()};l.a.Vim.defineEx("q","q",function(){h()}),l.a.Vim.defineEx("w","w",function(){d()}),l.a.Vim.defineEx("wq","wq",function(){d(),h()})},function(e){n.api.loading.hide(),n.api.echo(e.result),n.api.serverInfo()})}}]),n}(a.a);t.a=_}).call(t,n(6))},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function(){function e(t){r(this,e),this.$term=t,Object.assign(this,{anim:["/","|","\\","-"],prompt:null,delay:50,intervalId:null,counter:0})}return i(e,[{key:"show",value:function(){var e=this;this.counter++,this.$term.disable(),this.prompt=this.$term.get_prompt();var t=0;this.intervalId=setInterval(function(){e.$term.set_prompt(e.anim[t++]),t>e.anim.length-1&&(t=0)},this.delay)}},{key:"hide",value:function(){this.counter--,this.counter<=0&&(clearInterval(this.intervalId),this.$term.enable(),this.$term.set_prompt(this.prompt),this.counter=0)}}]),e}();t.a=o},function(e,t,n){"use strict";(function(e){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(){function t(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"white",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"black",o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];n(this,t),Object.assign(this,{options:o,colorList:{30:"black",31:"red",32:"green",33:"yellow",34:"blue",35:"magenta",36:"cyan",37:"white",39:"white"},backgroundList:{40:"black",41:"red",42:"green",43:"yellow",44:"blue",45:"magenta",46:"cyan",47:"white",49:"black"},colors:Object.assign(e.terminal.ansi_colors.bold,{white:e.terminal.ansi_colors.normal.white,red:e.terminal.ansi_colors.normal.red})}),this.foreground=this.getColor(r),this.background=this.getColor(i)}return r(t,[{key:"getColor",value:function(e){return this.colors[e]?this.colors[e]:e}},{key:"apply",value:function(t){return"[[;"+this.foreground+";"+this.background+"]"+e.terminal.escape_brackets(t)+"]"}}]),t}(),o=function(){function e(){n(this,e),Object.assign(this,{formatters:{error:new i("white","red"),info:new i("green"),comment:new i("yellow"),question:new i("magenta")}})}return r(e,[{key:"error",value:function(e){return this.formatters.error.apply(e)}},{key:"info",value:function(e){return this.formatters.info.apply(e)}},{key:"comment",value:function(e){return this.formatters.comment.apply(e)}},{key:"question",value:function(e){return this.formatters.question.apply(e)}}]),e}();t.a=o}).call(t,n(6))},function(e,t,n){!function(e){e(n(3))}(function(e){"use strict";function t(e){var t=e.getWrapperElement();e.state.fullScreenRestore={scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,width:t.style.width,height:t.style.height},t.style.width="",t.style.height="auto",t.className+=" CodeMirror-fullscreen",document.documentElement.style.overflow="hidden",e.refresh()}function n(e){var t=e.getWrapperElement();t.className=t.className.replace(/\s*CodeMirror-fullscreen\b/,""),document.documentElement.style.overflow="";var n=e.state.fullScreenRestore;t.style.width=n.width,t.style.height=n.height,window.scrollTo(n.scrollLeft,n.scrollTop),e.refresh()}e.defineOption("fullScreen",!1,function(r,i,o){o==e.Init&&(o=!1),!o!=!i&&(i?t(r):n(r))})})},function(e,t){function n(e){throw new Error("Cannot find module '"+e+"'.")}n.keys=function(){return[]},n.resolve=n,e.exports=n,n.id=85},function(e,t,n){!function(e){e(n(3),"cjs")}(function(e,t){function n(e,t){var n=t;return function(){0==--n&&e()}}function r(t,r){var i=e.modes[t].dependencies;if(!i)return r();for(var o=[],a=0;a<i.length;++a)e.modes.hasOwnProperty(i[a])||o.push(i[a]);if(!o.length)return r();for(var s=n(r,o.length),a=0;a<o.length;++a)e.requireMode(o[a],s)}e.modeURL||(e.modeURL="../mode/%N/%N.js");var i={};e.requireMode=function(n,o){if("string"!=typeof n&&(n=n.name),e.modes.hasOwnProperty(n))return r(n,o);if(i.hasOwnProperty(n))return i[n].push(o);var a=e.modeURL.replace(/%N/g,n);if("plain"==t){var s=document.createElement("script");s.src=a;var l=document.getElementsByTagName("script")[0],c=i[n]=[o];e.on(s,"load",function(){r(n,function(){for(var e=0;e<c.length;++e)c[e]()})}),l.parentNode.insertBefore(s,l)}else"cjs"==t?(!function(){var e=new Error('Cannot find module "."');throw e.code="MODULE_NOT_FOUND",e}(),o()):"amd"==t&&requirejs([a],o)},e.autoLoadMode=function(t,n){e.modes.hasOwnProperty(n)||e.requireMode(n,function(){t.setOption("mode",t.getOption("mode"))})}})},function(e,t,n){!function(e){e(n(3),n(38),n(36),n(37))}(function(e){"use strict";var t=[{keys:"<Left>",type:"keyToKey",toKeys:"h"},{keys:"<Right>",type:"keyToKey",toKeys:"l"},{keys:"<Up>",type:"keyToKey",toKeys:"k"},{keys:"<Down>",type:"keyToKey",toKeys:"j"},{keys:"<Space>",type:"keyToKey",toKeys:"l"},{keys:"<BS>",type:"keyToKey",toKeys:"h",context:"normal"},{keys:"<C-Space>",type:"keyToKey",toKeys:"W"},{keys:"<C-BS>",type:"keyToKey",toKeys:"B",context:"normal"},{keys:"<S-Space>",type:"keyToKey",toKeys:"w"},{keys:"<S-BS>",type:"keyToKey",toKeys:"b",context:"normal"},{keys:"<C-n>",type:"keyToKey",toKeys:"j"},{keys:"<C-p>",type:"keyToKey",toKeys:"k"},{keys:"<C-[>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-c>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-[>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"<C-c>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"s",type:"keyToKey",toKeys:"cl",context:"normal"},{keys:"s",type:"keyToKey",toKeys:"c",context:"visual"},{keys:"S",type:"keyToKey",toKeys:"cc",context:"normal"},{keys:"S",type:"keyToKey",toKeys:"VdO",context:"visual"},{keys:"<Home>",type:"keyToKey",toKeys:"0"},{keys:"<End>",type:"keyToKey",toKeys:"$"},{keys:"<PageUp>",type:"keyToKey",toKeys:"<C-b>"},{keys:"<PageDown>",type:"keyToKey",toKeys:"<C-f>"},{keys:"<CR>",type:"keyToKey",toKeys:"j^",context:"normal"},{keys:"<Ins>",type:"action",action:"toggleOverwrite",context:"insert"},{keys:"H",type:"motion",motion:"moveToTopLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"M",type:"motion",motion:"moveToMiddleLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"L",type:"motion",motion:"moveToBottomLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"h",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!1}},{keys:"l",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!0}},{keys:"j",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,linewise:!0}},{keys:"k",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,linewise:!0}},{keys:"gj",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!0}},{keys:"gk",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!1}},{keys:"w",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1}},{keys:"W",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1,bigWord:!0}},{keys:"e",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,inclusive:!0}},{keys:"E",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"b",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1}},{keys:"B",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1,bigWord:!0}},{keys:"ge",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,inclusive:!0}},{keys:"gE",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"{",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!1,toJumplist:!0}},{keys:"}",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!0,toJumplist:!0}},{keys:"<C-f>",type:"motion",motion:"moveByPage",motionArgs:{forward:!0}},{keys:"<C-b>",type:"motion",motion:"moveByPage",motionArgs:{forward:!1}},{keys:"<C-d>",type:"motion",motion:"moveByScroll",motionArgs:{forward:!0,explicitRepeat:!0}},{keys:"<C-u>",type:"motion",motion:"moveByScroll",motionArgs:{forward:!1,explicitRepeat:!0}},{keys:"gg",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"G",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!0,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"0",type:"motion",motion:"moveToStartOfLine"},{keys:"^",type:"motion",motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"+",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0}},{keys:"-",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,toFirstChar:!0}},{keys:"_",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0,repeatOffset:-1}},{keys:"$",type:"motion",motion:"moveToEol",motionArgs:{inclusive:!0}},{keys:"%",type:"motion",motion:"moveToMatchedSymbol",motionArgs:{inclusive:!0,toJumplist:!0}},{keys:"f<character>",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"F<character>",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!1}},{keys:"t<character>",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"T<character>",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!1}},{keys:";",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!0}},{keys:",",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!1}},{keys:"'<character>",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0,linewise:!0}},{keys:"`<character>",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0}},{keys:"]`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0}},{keys:"[`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1}},{keys:"]'",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0,linewise:!0}},{keys:"['",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1,linewise:!0}},{keys:"]p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0,matchIndent:!0}},{keys:"[p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0,matchIndent:!0}},{keys:"]<character>",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!0,toJumplist:!0}},{keys:"[<character>",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!1,toJumplist:!0}},{keys:"|",type:"motion",motion:"moveToColumn"},{keys:"o",type:"motion",motion:"moveToOtherHighlightedEnd",context:"visual"},{keys:"O",type:"motion",motion:"moveToOtherHighlightedEnd",motionArgs:{sameLine:!0},context:"visual"},{keys:"d",type:"operator",operator:"delete"},{keys:"y",type:"operator",operator:"yank"},{keys:"c",type:"operator",operator:"change"},{keys:">",type:"operator",operator:"indent",operatorArgs:{indentRight:!0}},{keys:"<",type:"operator",operator:"indent",operatorArgs:{indentRight:!1}},{keys:"g~",type:"operator",operator:"changeCase"},{keys:"gu",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},isEdit:!0},{keys:"gU",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},isEdit:!0},{keys:"n",type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:!0}},{keys:"N",type:"motion",motion:"findNext",motionArgs:{forward:!1,toJumplist:!0}},{keys:"x",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!0},operatorMotionArgs:{visualLine:!1}},{keys:"X",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!1},operatorMotionArgs:{visualLine:!0}},{keys:"D",type:"operatorMotion",operator:"delete",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"D",type:"operator",operator:"delete",operatorArgs:{linewise:!0},context:"visual"},{keys:"Y",type:"operatorMotion",operator:"yank",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"Y",type:"operator",operator:"yank",operatorArgs:{linewise:!0},context:"visual"},{keys:"C",type:"operatorMotion",operator:"change",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"C",type:"operator",operator:"change",operatorArgs:{linewise:!0},context:"visual"},{keys:"~",type:"operatorMotion",operator:"changeCase",motion:"moveByCharacters",motionArgs:{forward:!0},operatorArgs:{shouldMoveCursor:!0},context:"normal"},{keys:"~",type:"operator",operator:"changeCase",context:"visual"},{keys:"<C-w>",type:"operatorMotion",operator:"delete",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1},context:"insert"},{keys:"<C-i>",type:"action",action:"jumpListWalk",actionArgs:{forward:!0}},{keys:"<C-o>",type:"action",action:"jumpListWalk",actionArgs:{forward:!1}},{keys:"<C-e>",type:"action",action:"scroll",actionArgs:{forward:!0,linewise:!0}},{keys:"<C-y>",type:"action",action:"scroll",actionArgs:{forward:!1,linewise:!0}},{keys:"a",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"charAfter"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"eol"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"endOfSelectedArea"},context:"visual"},{keys:"i",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"inplace"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"firstNonBlank"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"startOfSelectedArea"},context:"visual"},{keys:"o",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!0},context:"normal"},{keys:"O",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!1},context:"normal"},{keys:"v",type:"action",action:"toggleVisualMode"},{keys:"V",type:"action",action:"toggleVisualMode",actionArgs:{linewise:!0}},{keys:"<C-v>",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"<C-q>",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"gv",type:"action",action:"reselectLastSelection"},{keys:"J",type:"action",action:"joinLines",isEdit:!0},{keys:"p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0}
0 ignored issues
show
Coding Style introduced by
Consider using undefined instead of void(0). It is equivalent and more straightforward to read.
Loading history...
Bug introduced by
The variable n is changed as part of the for loop for example by n++ on line 10. Only the value of the last iteration will be visible in this function if it is called after the loop.
Loading history...
Comprehensibility introduced by
Usage of the sequence operator is discouraged, since it may lead to obfuscated code.

The sequence or comma operator allows the inclusion of multiple expressions where only is permitted. The result of the sequence is the value of the last expression.

This operator is most often used in for statements.

Used in another places it can make code hard to read, especially when people do not realize it even exists as a seperate operator.

This check looks for usage of the sequence operator in locations where it is not necessary and could be replaced by a series of expressions or statements.

var a,b,c;

a = 1, b = 1,  c= 3;

could just as well be written as:

var a,b,c;

a = 1;
b = 1;
c = 3;

To learn more about the sequence operator, please refer to the MDN.

Loading history...
Comprehensibility Naming Best Practice introduced by
The variable a already seems to be declared on line 10. Consider using another variable name or omitting the var keyword.

This check looks for variables that are declared in multiple lines. There may be several reasons for this.

In the simplest case the variable name was reused by mistake. This may lead to very hard to locate bugs.

If you want to reuse a variable for another purpose, consider declaring it at or near the top of your function and just assigning to it subsequently so it is always declared.

Loading history...
Unused Code introduced by
The parameter e is not used and could be removed.

This check looks for parameters in functions that are not used in the function body and are not followed by other parameters which are used inside the function.

Loading history...
Complexity introduced by
A for in loop automatically includes the property of any prototype object, consider checking the key using hasOwnProperty.

When iterating over the keys of an object, this includes not only the keys of the object, but also keys contained in the prototype of that object. It is generally a best practice to check for these keys specifically:

var someObject;
for (var key in someObject) {
    if ( ! someObject.hasOwnProperty(key)) {
        continue; // Skip keys from the prototype.
    }

    doSomethingWith(key);
}
Loading history...
Coding Style Best Practice introduced by
By convention, constructors like i should be capitalized.
Loading history...
Unused Code introduced by
The parameter n is not used and could be removed.

This check looks for parameters in functions that are not used in the function body and are not followed by other parameters which are used inside the function.

Loading history...
Coding Style introduced by
As per coding-style, switch statements should have a default case.
Loading history...
Unused Code introduced by
The parameter t is not used and could be removed.

This check looks for parameters in functions that are not used in the function body and are not followed by other parameters which are used inside the function.

Loading history...
Coding Style Best Practice introduced by
Curly braces around statements make for more readable code and help prevent bugs when you add further statements.

Consider adding curly braces around all statements when they are executed conditionally. This is optional if there is only one statement, but leaving them out can lead to unexpected behaviour if another statement is added later.

Consider:

if (a > 0)
    b = 42;

If you or someone else later decides to put another statement in, only the first statement will be executed.

if (a > 0)
    console.log("a > 0");
    b = 42;

In this case the statement b = 42 will always be executed, while the logging statement will be executed conditionally.

if (a > 0) {
    console.log("a > 0");
    b = 42;
}

ensures that the proper code will be executed conditionally no matter how many statements are added or removed.

Loading history...
Unused Code introduced by
The assignment to variable a seems to be never used. Consider removing it.
Loading history...
Best Practice introduced by
There is no return statement in this branch, but you do return something in other branches. Did you maybe miss it? If you do not want to return anything, consider adding return undefined; explicitly.
Loading history...
Complexity Best Practice introduced by
There is no return statement if void(0) !== a is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Unused Code introduced by
The assignment to variable s seems to be never used. Consider removing it.
Loading history...
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
11
},{keys:"P",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0}},{keys:"r<character>",type:"action",action:"replace",isEdit:!0},{keys:"@<character>",type:"action",action:"replayMacro"},{keys:"q<character>",type:"action",action:"enterMacroRecordMode"},{keys:"R",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{replace:!0}},{keys:"u",type:"action",action:"undo",context:"normal"},{keys:"u",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},context:"visual",isEdit:!0},{keys:"U",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},context:"visual",isEdit:!0},{keys:"<C-r>",type:"action",action:"redo"},{keys:"m<character>",type:"action",action:"setMark"},{keys:'"<character>',type:"action",action:"setRegister"},{keys:"zz",type:"action",action:"scrollToCursor",actionArgs:{position:"center"}},{keys:"z.",type:"action",action:"scrollToCursor",actionArgs:{position:"center"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"zt",type:"action",action:"scrollToCursor",actionArgs:{position:"top"}},{keys:"z<CR>",type:"action",action:"scrollToCursor",actionArgs:{position:"top"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"z-",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"}},{keys:"zb",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:".",type:"action",action:"repeatLastEdit"},{keys:"<C-a>",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!0,backtrack:!1}},{keys:"<C-x>",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!1,backtrack:!1}},{keys:"<C-t>",type:"action",action:"indent",actionArgs:{indentRight:!0},context:"insert"},{keys:"<C-d>",type:"action",action:"indent",actionArgs:{indentRight:!1},context:"insert"},{keys:"a<character>",type:"motion",motion:"textObjectManipulation"},{keys:"i<character>",type:"motion",motion:"textObjectManipulation",motionArgs:{textObjectInner:!0}},{keys:"/",type:"search",searchArgs:{forward:!0,querySrc:"prompt",toJumplist:!0}},{keys:"?",type:"search",searchArgs:{forward:!1,querySrc:"prompt",toJumplist:!0}},{keys:"*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"g*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:"g#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:":",type:"ex"}],n=[{name:"colorscheme",shortName:"colo"},{name:"map"},{name:"imap",shortName:"im"},{name:"nmap",shortName:"nm"},{name:"vmap",shortName:"vm"},{name:"unmap"},{name:"write",shortName:"w"},{name:"undo",shortName:"u"},{name:"redo",shortName:"red"},{name:"set",shortName:"se"},{name:"set",shortName:"se"},{name:"setlocal",shortName:"setl"},{name:"setglobal",shortName:"setg"},{name:"sort",shortName:"sor"},{name:"substitute",shortName:"s",possiblyAsync:!0},{name:"nohlsearch",shortName:"noh"},{name:"yank",shortName:"y"},{name:"delmarks",shortName:"delm"},{name:"registers",shortName:"reg",excludeFromCommandHistory:!0},{name:"global",shortName:"g"}],r=e.Pos,i=function(){function i(t){t.setOption("disableInput",!0),t.setOption("showCursorWhenSelecting",!1),e.signal(t,"vim-mode-change",{mode:"normal"}),t.on("cursorActivity",et),_(t),e.on(t.getInputField(),"paste",u(t))}function o(t){t.setOption("disableInput",!1),t.off("cursorActivity",et),e.off(t.getInputField(),"paste",u(t)),t.state.vim=null}function a(t,n){this==e.keyMap.vim&&e.rmClass(t.getWrapperElement(),"cm-fat-cursor"),n&&n.attach==s||o(t,!1)}function s(t,n){this==e.keyMap.vim&&e.addClass(t.getWrapperElement(),"cm-fat-cursor"),n&&n.attach==s||i(t)}function l(t,n){if(n){if(this[t])return this[t];var r=c(t);if(!r)return!1;var i=e.Vim.findKey(n,r);return"function"==typeof i&&e.signal(n,"vim-keypress",r),i}}function c(e){if("'"==e.charAt(0))return e.charAt(1);var t=e.split(/-(?!$)/),n=t[t.length-1];if(1==t.length&&1==t[0].length)return!1;if(2==t.length&&"Shift"==t[0]&&1==n.length)return!1;for(var r=!1,i=0;i<t.length;i++){var o=t[i];o in st?t[i]=st[o]:r=!0,o in lt&&(t[i]=lt[o])}return!!r&&(g(n)&&(t[t.length-1]=n.toLowerCase()),"<"+t.join("-")+">")}function u(e){var t=e.state.vim;return t.onPasteFn||(t.onPasteFn=function(){t.insertMode||(e.setCursor(I(e.getCursor(),0,1)),Tt.enterInsertMode(e,{},t))}),t.onPasteFn}function f(e,t){for(var n=[],r=e;r<e+t;r++)n.push(String.fromCharCode(r));return n}function p(e,t){return t>=e.firstLine()&&t<=e.lastLine()}function d(e){return/^[a-z]$/.test(e)}function h(e){return"()[]{}".indexOf(e)!=-1}function m(e){return ct.test(e)}function g(e){return/^[A-Z]$/.test(e)}function v(e){return/^\s*$/.test(e)}function y(e,t){for(var n=0;n<t.length;n++)if(t[n]==e)return!0;return!1}function x(e,t,n,r,i){if(void 0===t&&!i)throw Error("defaultValue is required unless callback is provided");if(n||(n="string"),vt[e]={type:n,defaultValue:t,callback:i},r)for(var o=0;o<r.length;o++)vt[r[o]]=vt[e];t&&b(e,t)}function b(e,t,n,r){var i=vt[e];r=r||{};var o=r.scope;if(!i)throw Error("Unknown option: "+e);if("boolean"==i.type){if(t&&t!==!0)throw Error("Invalid argument: "+e+"="+t);t!==!1&&(t=!0)}i.callback?("local"!==o&&i.callback(t,void 0),"global"!==o&&n&&i.callback(t,n)):("local"!==o&&(i.value="boolean"==i.type?!!t:t),"global"!==o&&n&&(n.state.vim.options[e]={value:t}))}function w(e,t,n){var r=vt[e];n=n||{};var i=n.scope;if(!r)throw Error("Unknown option: "+e);{if(!r.callback){var o="global"!==i&&t&&t.state.vim.options[e];return(o||"local"!==i&&r||{}).value}var o=t&&r.callback(void 0,t);if("global"!==i&&void 0!==o)return o;if("local"!==i)return r.callback()}}function k(){this.latestRegister=void 0,this.isPlaying=!1,this.isRecording=!1,this.replaySearchQueries=[],this.onRecordingDone=void 0,this.lastInsertModeChanges=xt()}function _(e){return e.state.vim||(e.state.vim={inputState:new S,lastEditInputState:void 0,lastEditActionCommand:void 0,lastHPos:-1,lastHSPos:-1,lastMotion:null,marks:{},fakeCursor:null,insertMode:!1,insertModeRepeat:void 0,visualMode:!1,visualLine:!1,visualBlock:!1,lastSelection:null,lastPastedText:null,sel:{},options:{}}),e.state.vim}function C(){bt={searchQuery:null,searchIsReversed:!1,lastSubstituteReplacePart:void 0,jumpList:yt(),macroModeState:new k,lastCharacterSearch:{increment:0,forward:!0,selectedCharacter:""},registerController:new L({}),searchHistoryController:new F({}),exCommandHistoryController:new F({})};for(var e in vt){var t=vt[e];t.value=t.defaultValue}}function S(){this.prefixRepeat=[],this.motionRepeat=[],this.operator=null,this.operatorArgs=null,this.motion=null,this.motionArgs=null,this.keyBuffer=[],this.registerName=null}function T(t,n){t.state.vim.inputState=new S,e.signal(t,"vim-command-done",n)}function A(e,t,n){this.clear(),this.keyBuffer=[e||""],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!!t,this.blockwise=!!n}function M(e,t){var n=bt.registerController.registers[e];if(!e||1!=e.length)throw Error("Register name must be 1 character");if(n[e])throw Error("Register already defined "+e);n[e]=t,gt.push(e)}function L(e){this.registers=e,this.unnamedRegister=e['"']=new A,e["."]=new A,e[":"]=new A,e["/"]=new A}function F(){this.historyBuffer=[],this.iterator=0,this.initialPrefix=null}function O(e,t){Ct[e]=t}function E(e,t){for(var n=[],r=0;r<t;r++)n.push(e);return n}function D(e,t){St[e]=t}function N(e,t){Tt[e]=t}function j(e,t,n){var i=Math.min(Math.max(e.firstLine(),t.line),e.lastLine()),o=X(e,i)-1;o=n?o+1:o;var a=Math.min(Math.max(0,t.ch),o);return r(i,a)}function P(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function I(e,t,n){return"object"==typeof t&&(n=t.ch,t=t.line),r(e.line+t,e.ch+n)}function R(e,t){return{line:t.line-e.line,ch:t.line-e.line}}function q(e,t,n,r){for(var i,o=[],a=[],s=0;s<t.length;s++){var l=t[s];"insert"==n&&"insert"!=l.context||l.context&&l.context!=n||r.operator&&"action"==l.type||!(i=B(e,l.keys))||("partial"==i&&o.push(l),"full"==i&&a.push(l))}return{partial:o.length&&o,full:a.length&&a}}function B(e,t){if("<character>"==t.slice(-11)){var n=t.length-11,r=e.slice(0,n),i=t.slice(0,n);return r==i&&e.length>n?"full":0==i.indexOf(r)&&"partial"}return e==t?"full":0==t.indexOf(e)&&"partial"}function z(e){var t=/^.*(<[\w\-]+>)$/.exec(e),n=t?t[1]:e.slice(-1);if(n.length>1)switch(n){case"<CR>":n="\n";break;case"<Space>":n=" "}return n}function H(e,t,n){return function(){for(var r=0;r<n;r++)t(e)}}function W(e){return r(e.line,e.ch)}function $(e,t){return e.ch==t.ch&&e.line==t.line}function K(e,t){return e.line<t.line||e.line==t.line&&e.ch<t.ch}function U(e,t){return arguments.length>2&&(t=U.apply(void 0,Array.prototype.slice.call(arguments,1))),K(e,t)?e:t}function V(e,t){return arguments.length>2&&(t=V.apply(void 0,Array.prototype.slice.call(arguments,1))),K(e,t)?t:e}function G(e,t,n){var r=K(e,t),i=K(t,n);return r&&i}function X(e,t){return e.getLine(t).length}function Y(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function J(e){return e.replace(/([.?*+$\[\]\/\\(){}|\-])/g,"\\$1")}function Q(e,t,n){var i=X(e,t),o=new Array(n-i+1).join(" ");e.setCursor(r(t,i)),e.replaceRange(o,e.getCursor())}function Z(e,t){var n=[],i=e.listSelections(),o=W(e.clipPos(t)),a=!$(t,o),s=e.getCursor("head"),l=te(i,s),c=$(i[l].head,i[l].anchor),u=i.length-1,f=u-l>l?u:0,p=i[f].anchor,d=Math.min(p.line,o.line),h=Math.max(p.line,o.line),m=p.ch,g=o.ch,v=i[f].head.ch-m,y=g-m;v>0&&y<=0?(m++,a||g--):v<0&&y>=0?(m--,c||g++):v<0&&y==-1&&(m--,g++);for(var x=d;x<=h;x++){var b={anchor:new r(x,m),head:new r(x,g)};n.push(b)}return l=o.line==h?n.length-1:0,e.setSelections(n),t.ch=g,p.ch=m,p}function ee(e,t,n){for(var r=[],i=0;i<n;i++){var o=I(t,i,0);r.push({anchor:o,head:o})}e.setSelections(r,0)}function te(e,t,n){for(var r=0;r<e.length;r++){var i="head"!=n&&$(e[r].anchor,t),o="anchor"!=n&&$(e[r].head,t);if(i||o)return r}return-1}function ne(e,t){var n=t.lastSelection,i=function(){var t=e.listSelections(),n=t[0],r=t[t.length-1],i=K(n.anchor,n.head)?n.anchor:n.head,o=K(r.anchor,r.head)?r.head:r.anchor;return[i,o]},o=function(){var t=e.getCursor(),i=e.getCursor(),o=n.visualBlock;if(o){var a=o.width,s=o.height;i=r(t.line+s,t.ch+a);for(var l=[],c=t.line;c<i.line;c++){var u=r(c,t.ch),f=r(c,i.ch),p={anchor:u,head:f};l.push(p)}e.setSelections(l)}else{var d=n.anchorMark.find(),h=n.headMark.find(),m=h.line-d.line,g=h.ch-d.ch;i={line:i.line+m,ch:m?i.ch:g+i.ch},n.visualLine&&(t=r(t.line,0),i=r(i.line,X(e,i.line))),e.setSelection(t,i)}return[t,i]};return t.visualMode?i():o()}function re(e,t){var n=t.sel.anchor,r=t.sel.head;t.lastPastedText&&(r=e.posFromIndex(e.indexFromPos(n)+t.lastPastedText.length),t.lastPastedText=null),t.lastSelection={anchorMark:e.setBookmark(n),headMark:e.setBookmark(r),anchor:W(n),head:W(r),visualMode:t.visualMode,visualLine:t.visualLine,visualBlock:t.visualBlock}}function ie(e,t,n){var i,o=e.state.vim.sel,a=o.head,s=o.anchor;return K(n,t)&&(i=n,n=t,t=i),K(a,s)?(a=U(t,a),s=V(s,n)):(s=U(t,s),a=V(a,n),a=I(a,0,-1),a.ch==-1&&a.line!=e.firstLine()&&(a=r(a.line-1,X(e,a.line-1)))),[s,a]}function oe(e,t,n){var r=e.state.vim;t=t||r.sel;var n=n||r.visualLine?"line":r.visualBlock?"block":"char",i=ae(e,t,n);e.setSelections(i.ranges,i.primary),tt(e)}function ae(e,t,n,i){var o=W(t.head),a=W(t.anchor);if("char"==n){var s=i||K(t.head,t.anchor)?0:1,l=K(t.head,t.anchor)?1:0;return o=I(t.head,0,s),a=I(t.anchor,0,l),{ranges:[{anchor:a,head:o}],primary:0}}if("line"==n){if(K(t.head,t.anchor))o.ch=0,a.ch=X(e,a.line);else{a.ch=0;var c=e.lastLine();o.line>c&&(o.line=c),o.ch=X(e,o.line)}return{ranges:[{anchor:a,head:o}],primary:0}}if("block"==n){for(var u=Math.min(a.line,o.line),f=Math.min(a.ch,o.ch),p=Math.max(a.line,o.line),d=Math.max(a.ch,o.ch)+1,h=p-u+1,m=o.line==u?0:h-1,g=[],v=0;v<h;v++)g.push({anchor:r(u+v,f),head:r(u+v,d)});return{ranges:g,primary:m}}}function se(e){var t=e.getCursor("head");return 1==e.getSelection().length&&(t=U(t,e.getCursor("anchor"))),t}function le(t,n){var r=t.state.vim;n!==!1&&t.setCursor(j(t,r.sel.head)),re(t,r),r.visualMode=!1,r.visualLine=!1,r.visualBlock=!1,e.signal(t,"vim-mode-change",{mode:"normal"}),r.fakeCursor&&r.fakeCursor.clear()}function ce(e,t,n){var r=e.getRange(t,n);if(/\n\s*$/.test(r)){var i=r.split("\n");i.pop();for(var o,o=i.pop();i.length>0&&o&&v(o);o=i.pop())n.line--,n.ch=0;o?(n.line--,n.ch=X(e,n.line)):n.ch=0}}function ue(e,t,n){t.ch=0,n.ch=0,n.line++}function fe(e){if(!e)return 0;var t=e.search(/\S/);return t==-1?e.length:t}function pe(e,t,n,i,o){for(var a=se(e),s=e.getLine(a.line),l=a.ch,c=o?ut[0]:ft[0];!c(s.charAt(l));)if(l++,l>=s.length)return null;i?c=ft[0]:(c=ut[0],c(s.charAt(l))||(c=ut[1]));for(var u=l,f=l;c(s.charAt(u))&&u<s.length;)u++;for(;c(s.charAt(f))&&f>=0;)f--;if(f++,t){for(var p=u;/\s/.test(s.charAt(u))&&u<s.length;)u++;if(p==u){for(var d=f;/\s/.test(s.charAt(f-1))&&f>0;)f--;f||(f=d)}}return{start:r(a.line,f),end:r(a.line,u)}}function de(e,t,n){$(t,n)||bt.jumpList.add(e,t,n)}function he(e,t){bt.lastCharacterSearch.increment=e,bt.lastCharacterSearch.forward=t.forward,bt.lastCharacterSearch.selectedCharacter=t.selectedCharacter}function me(e,t,n,i){var o=W(e.getCursor()),a=n?1:-1,s=n?e.lineCount():-1,l=o.ch,c=o.line,u=e.getLine(c),f={lineText:u,nextCh:u.charAt(l),lastCh:null,index:l,symb:i,reverseSymb:(n?{")":"(","}":"{"}:{"(":")","{":"}"})[i],forward:n,depth:0,curMoveThrough:!1},p=At[i];if(!p)return o;var d=Mt[p].init,h=Mt[p].isComplete;for(d&&d(f);c!==s&&t;){if(f.index+=a,f.nextCh=f.lineText.charAt(f.index),!f.nextCh){if(c+=a,f.lineText=e.getLine(c)||"",a>0)f.index=0;else{var m=f.lineText.length;f.index=m>0?m-1:0}f.nextCh=f.lineText.charAt(f.index)}h(f)&&(o.line=c,o.ch=f.index,t--)}return f.nextCh||f.curMoveThrough?r(c,f.index):o}function ge(e,t,n,r,i){var o=t.line,a=t.ch,s=e.getLine(o),l=n?1:-1,c=r?ft:ut;if(i&&""==s){if(o+=l,s=e.getLine(o),!p(e,o))return null;a=n?0:s.length}for(;;){if(i&&""==s)return{from:0,to:0,line:o};for(var u=l>0?s.length:-1,f=u,d=u;a!=u;){for(var h=!1,m=0;m<c.length&&!h;++m)if(c[m](s.charAt(a))){for(f=a;a!=u&&c[m](s.charAt(a));)a+=l;if(d=a,h=f!=d,f==t.ch&&o==t.line&&d==f+l)continue;return{from:Math.min(f,d+1),to:Math.max(f,d),line:o}}h||(a+=l)}if(o+=l,!p(e,o))return null;s=e.getLine(o),a=l>0?0:s.length}}function ve(e,t,n,i,o,a){var s=W(t),l=[];(i&&!o||!i&&o)&&n++;for(var c=!(i&&o),u=0;u<n;u++){var f=ge(e,t,i,a,c);if(!f){var p=X(e,e.lastLine());l.push(i?{line:e.lastLine(),from:p,to:p}:{line:0,from:0,to:0});break}l.push(f),t=r(f.line,i?f.to-1:f.from)}var d=l.length!=n,h=l[0],m=l.pop();return i&&!o?(d||h.from==s.ch&&h.line==s.line||(m=l.pop()),r(m.line,m.from)):i&&o?r(m.line,m.to-1):!i&&o?(d||h.to==s.ch&&h.line==s.line||(m=l.pop()),r(m.line,m.to)):r(m.line,m.from)}function ye(e,t,n,i){for(var o,a=e.getCursor(),s=a.ch,l=0;l<t;l++){var c=e.getLine(a.line);if(o=we(s,c,i,n,!0),o==-1)return null;s=o}return r(e.getCursor().line,o)}function xe(e,t){var n=e.getCursor().line;return j(e,r(n,t-1))}function be(e,t,n,r){y(n,mt)&&(t.marks[n]&&t.marks[n].clear(),t.marks[n]=e.setBookmark(r))}function we(e,t,n,r,i){var o;return r?(o=t.indexOf(n,e+1),o==-1||i||(o-=1)):(o=t.lastIndexOf(n,e-1),o==-1||i||(o+=1)),o}function ke(e,t,n,i,o){function a(t){return!e.getLine(t)}function s(e,t,n){return n?a(e)!=a(e+t):!a(e)&&a(e+t)}var l,c,u=t.line,f=e.firstLine(),p=e.lastLine(),d=u;if(i){for(;f<=d&&d<=p&&n>0;)s(d,i)&&n--,d+=i;return new r(d,0)}var h=e.state.vim;if(h.visualLine&&s(u,1,!0)){var m=h.sel.anchor;s(m.line,-1,!0)&&(o&&m.line==u||(u+=1))}var g=a(u);for(d=u;d<=p&&n;d++)s(d,1,!0)&&(o&&a(d)==g||n--);for(c=new r(d,0),d>p&&!g?g=!0:o=!1,d=u;d>f&&(o&&a(d)!=g&&d!=u||!s(d,-1,!0));d--);return l=new r(d,0),{start:l,end:c}}function _e(e,t,n,i){var o,a,s=t,l={"(":/[()]/,")":/[()]/,"[":/[[\]]/,"]":/[[\]]/,"{":/[{}]/,"}":/[{}]/}[n],c={"(":"(",")":"(","[":"[","]":"[","{":"{","}":"{"}[n],u=e.getLine(s.line).charAt(s.ch),f=u===c?1:0;if(o=e.scanForBracket(r(s.line,s.ch+f),-1,null,{bracketRegex:l}),a=e.scanForBracket(r(s.line,s.ch+f),1,null,{bracketRegex:l}),!o||!a)return{start:s,end:s};if(o=o.pos,a=a.pos,o.line==a.line&&o.ch>a.ch||o.line>a.line){var p=o;o=a,a=p}return i?a.ch+=1:o.ch+=1,{start:o,end:a}}function Ce(e,t,n,i){var o,a,s,l,c=W(t),u=e.getLine(c.line),f=u.split(""),p=f.indexOf(n);if(c.ch<p?c.ch=p:p<c.ch&&f[c.ch]==n&&(a=c.ch,--c.ch),f[c.ch]!=n||a)for(s=c.ch;s>-1&&!o;s--)f[s]==n&&(o=s+1);else o=c.ch+1;if(o&&!a)for(s=o,l=f.length;s<l&&!a;s++)f[s]==n&&(a=s);return o&&a?(i&&(--o,++a),{start:r(c.line,o),end:r(c.line,a)}):{start:c,end:c}}function Se(){}function Te(e){var t=e.state.vim;return t.searchState_||(t.searchState_=new Se)}function Ae(e,t,n,r,i){e.openDialog?e.openDialog(t,r,{bottom:!0,value:i.value,onKeyDown:i.onKeyDown,onKeyUp:i.onKeyUp,selectValueOnOpen:!1}):r(prompt(n,""))}function Me(e){var t=Le(e)||[];if(!t.length)return[];var n=[];if(0===t[0]){for(var r=0;r<t.length;r++)"number"==typeof t[r]&&n.push(e.substring(t[r]+1,t[r+1]));return n}}function Le(e){for(var t=!1,n=[],r=0;r<e.length;r++){var i=e.charAt(r);t||"/"!=i||n.push(r),t=!t&&"\\"==i}return n}function Fe(e){for(var t="|(){",n="}",r=!1,i=[],o=-1;o<e.length;o++){var a=e.charAt(o)||"",s=e.charAt(o+1)||"",l=s&&t.indexOf(s)!=-1;r?("\\"===a&&l||i.push(a),r=!1):"\\"===a?(r=!0,s&&n.indexOf(s)!=-1&&(l=!0),l&&"\\"!==s||i.push(a)):(i.push(a),l&&"\\"!==s&&i.push("\\"))}return i.join("")}function Oe(e){for(var t=!1,n=[],r=-1;r<e.length;r++){var i=e.charAt(r)||"",o=e.charAt(r+1)||"";Lt[i+o]?(n.push(Lt[i+o]),r++):t?(n.push(i),t=!1):"\\"===i?(t=!0,m(o)||"$"===o?n.push("$"):"/"!==o&&"\\"!==o&&n.push("\\")):("$"===i&&n.push("$"),n.push(i),"/"===o&&n.push("\\"))}return n.join("")}function Ee(t){for(var n=new e.StringStream(t),r=[];!n.eol();){for(;n.peek()&&"\\"!=n.peek();)r.push(n.next());var i=!1;for(var o in Ft)if(n.match(o,!0)){i=!0,r.push(Ft[o]);break}i||r.push(n.next())}return r.join("")}function De(e,t,n){var r=bt.registerController.getRegister("/");if(r.setText(e),e instanceof RegExp)return e;var i,o,a=Le(e);if(a.length){i=e.substring(0,a[0]);var s=e.substring(a[0]);o=s.indexOf("i")!=-1}else i=e;if(!i)return null;w("pcre")||(i=Fe(i)),n&&(t=/^[^A-Z]*$/.test(i));var l=new RegExp(i,t||o?"i":void 0);return l}function Ne(e,t){e.openNotification?e.openNotification('<span style="color: red">'+t+"</span>",{bottom:!0,duration:5e3}):alert(t)}function je(e,t){var n='<span style="font-family: monospace; white-space: pre">'+(e||"")+'<input type="text"></span>';return t&&(n+=' <span style="color: #888">'+t+"</span>"),n}function Pe(e,t){var n=(t.prefix||"")+" "+(t.desc||""),r=je(t.prefix,t.desc);Ae(e,r,n,t.onClose,t)}function Ie(e,t){if(e instanceof RegExp&&t instanceof RegExp){for(var n=["global","multiline","ignoreCase","source"],r=0;r<n.length;r++){var i=n[r];if(e[i]!==t[i])return!1}return!0}return!1}function Re(e,t,n,r){if(t){var i=Te(e),o=De(t,!!n,!!r);if(o)return Be(e,o),Ie(o,i.getQuery())?o:(i.setQuery(o),o)}}function qe(e){if("^"==e.source.charAt(0))var t=!0;return{token:function(n){if(t&&!n.sol())return void n.skipToEnd();var r=n.match(e,!1);if(r)return 0==r[0].length?(n.next(),"searching"):n.sol()||(n.backUp(1),e.exec(n.next()+r[0]))?(n.match(e),"searching"):(n.next(),null);for(;!n.eol()&&(n.next(),!n.match(e,!1)););},query:e}}function Be(e,t){var n=Te(e),r=n.getOverlay();r&&t==r.query||(r&&e.removeOverlay(r),r=qe(t),e.addOverlay(r),e.showMatchesOnScrollbar&&(n.getScrollbarAnnotate()&&n.getScrollbarAnnotate().clear(),n.setScrollbarAnnotate(e.showMatchesOnScrollbar(t))),n.setOverlay(r))}function ze(e,t,n,i){return void 0===i&&(i=1),e.operation(function(){for(var o=e.getCursor(),a=e.getSearchCursor(n,o),s=0;s<i;s++){var l=a.find(t);if(0==s&&l&&$(a.from(),o)&&(l=a.find(t)),!l&&(a=e.getSearchCursor(n,t?r(e.lastLine()):r(e.firstLine(),0)),!a.find(t)))return}return a.from()})}function He(e){var t=Te(e);e.removeOverlay(Te(e).getOverlay()),t.setOverlay(null),t.getScrollbarAnnotate()&&(t.getScrollbarAnnotate().clear(),t.setScrollbarAnnotate(null))}function We(e,t,n){return"number"!=typeof e&&(e=e.line),t instanceof Array?y(e,t):n?e>=t&&e<=n:e==t}function $e(e){var t=e.getScrollInfo(),n=6,r=10,i=e.coordsChar({left:0,top:n+t.top},"local"),o=t.clientHeight-r+t.top,a=e.coordsChar({left:0,top:o},"local");return{top:i.line,bottom:a.line}}function Ke(t,n,r,i,o,a,s,l,c){function u(){t.operation(function(){for(;!m;)f(),p();d()})}function f(){var e=t.getRange(a.from(),a.to()),n=e.replace(s,l);a.replace(n)}function p(){for(;a.findNext()&&We(a.from(),i,o);)if(r||!g||a.from().line!=g.line)return t.scrollIntoView(a.from(),30),t.setSelection(a.from(),a.to()),g=a.from(),void(m=!1);m=!0}function d(e){if(e&&e(),t.focus(),g){t.setCursor(g);var n=t.state.vim;n.exMode=!1,n.lastHPos=n.lastHSPos=g.ch}c&&c()}function h(n,r,i){e.e_stop(n);var o=e.keyName(n);switch(o){case"Y":f(),p();break;case"N":p();break;case"A":var a=c;c=void 0,t.operation(u),c=a;break;case"L":f();case"Q":case"Esc":case"Ctrl-C":case"Ctrl-[":d(i)}return m&&d(i),!0}t.state.vim.exMode=!0;var m=!1,g=a.from();return p(),m?void Ne(t,"No matches for "+s.source):n?void Pe(t,{prefix:"replace with <strong>"+l+"</strong> (y/n/a/q/l)",onKeyDown:h}):(u(),void(c&&c()))}function Ue(t){var n=t.state.vim,r=bt.macroModeState,i=bt.registerController.getRegister("."),o=r.isPlaying,a=r.lastInsertModeChanges,s=[];if(!o){for(var l=a.inVisualBlock?n.lastSelection.visualBlock.height:1,c=a.changes,s=[],u=0;u<c.length;)s.push(c[u]),c[u]instanceof rt?u++:u+=l;a.changes=s,t.off("change",Ze),e.off(t.getInputField(),"keydown",it)}!o&&n.insertModeRepeat>1&&(ot(t,n,n.insertModeRepeat-1,!0),n.lastEditInputState.repeatOverride=n.insertModeRepeat),delete n.insertModeRepeat,n.insertMode=!1,t.setCursor(t.getCursor().line,t.getCursor().ch-1),t.setOption("keyMap","vim"),t.setOption("disableInput",!0),t.toggleOverwrite(!1),i.setText(a.changes.join("")),e.signal(t,"vim-mode-change",{mode:"normal"}),r.isRecording&&Je(r)}function Ve(e){t.unshift(e)}function Ge(e,t,n,r,i){var o={keys:e,type:t};o[t]=n,o[t+"Args"]=r;for(var a in i)o[a]=i[a];Ve(o)}function Xe(t,n,r,i){var o=bt.registerController.getRegister(i);if(":"==i)return o.keyBuffer[0]&&Nt.processCommand(t,o.keyBuffer[0]),void(r.isPlaying=!1);var a=o.keyBuffer,s=0;r.isPlaying=!0,r.replaySearchQueries=o.searchQueries.slice(0);for(var l=0;l<a.length;l++)for(var c,u,f=a[l];f;)if(c=/<\w+-.+?>|<\w+>|./.exec(f),u=c[0],f=f.substring(c.index+u.length),e.Vim.handleKey(t,u,"macro"),n.insertMode){var p=o.insertModeChanges[s++].changes;bt.macroModeState.lastInsertModeChanges.changes=p,at(t,p,1),Ue(t)}r.isPlaying=!1}function Ye(e,t){if(!e.isPlaying){var n=e.latestRegister,r=bt.registerController.getRegister(n);r&&r.pushText(t)}}function Je(e){if(!e.isPlaying){var t=e.latestRegister,n=bt.registerController.getRegister(t);n&&n.pushInsertModeChanges&&n.pushInsertModeChanges(e.lastInsertModeChanges)}}function Qe(e,t){if(!e.isPlaying){var n=e.latestRegister,r=bt.registerController.getRegister(n);r&&r.pushSearchQuery&&r.pushSearchQuery(t)}}function Ze(e,t){var n=bt.macroModeState,r=n.lastInsertModeChanges;if(!n.isPlaying)for(;t;){if(r.expectCursorActivityForChange=!0,"+input"==t.origin||"paste"==t.origin||void 0===t.origin){var i=t.text.join("\n");r.maybeReset&&(r.changes=[],r.maybeReset=!1),r.changes.push(i)}t=t.next}}function et(e){var t=e.state.vim;if(t.insertMode){var n=bt.macroModeState;if(n.isPlaying)return;var r=n.lastInsertModeChanges;r.expectCursorActivityForChange?r.expectCursorActivityForChange=!1:r.maybeReset=!0}else e.curOp.isVimOp||nt(e,t);t.visualMode&&tt(e)}function tt(e){var t=e.state.vim,n=j(e,W(t.sel.head)),r=I(n,0,1);t.fakeCursor&&t.fakeCursor.clear(),t.fakeCursor=e.markText(n,r,{className:"cm-animate-fat-cursor"})}function nt(t,n){var r=t.getCursor("anchor"),i=t.getCursor("head");if(n.visualMode&&!t.somethingSelected()?le(t,!1):n.visualMode||n.insertMode||!t.somethingSelected()||(n.visualMode=!0,n.visualLine=!1,e.signal(t,"vim-mode-change",{mode:"visual"})),n.visualMode){var o=K(i,r)?0:-1,a=K(i,r)?-1:0;i=I(i,0,o),r=I(r,0,a),n.sel={anchor:r,head:i},be(t,n,"<",U(i,r)),be(t,n,">",V(i,r))}else n.insertMode||(n.lastHPos=t.getCursor().ch)}function rt(e){this.keyName=e}function it(t){function n(){return i.maybeReset&&(i.changes=[],i.maybeReset=!1),i.changes.push(new rt(o)),!0}var r=bt.macroModeState,i=r.lastInsertModeChanges,o=e.keyName(t);o&&(o.indexOf("Delete")==-1&&o.indexOf("Backspace")==-1||e.lookupKey(o,"vim-insert",n))}function ot(e,t,n,r){function i(){s?_t.processAction(e,t,t.lastEditActionCommand):_t.evalInput(e,t)}function o(n){if(a.lastInsertModeChanges.changes.length>0){n=t.lastEditActionCommand?n:1;var r=a.lastInsertModeChanges;at(e,r.changes,n)}}var a=bt.macroModeState;a.isPlaying=!0;var s=!!t.lastEditActionCommand,l=t.inputState;if(t.inputState=t.lastEditInputState,s&&t.lastEditActionCommand.interlaceInsertRepeat)for(var c=0;c<n;c++)i(),o(1);else r||i(),o(n);t.inputState=l,t.insertMode&&!r&&Ue(e),a.isPlaying=!1}function at(t,n,r){function i(n){return"string"==typeof n?e.commands[n](t):n(t),!0}var o=t.getCursor("head"),a=bt.macroModeState.lastInsertModeChanges.inVisualBlock;if(a){var s=t.state.vim,l=s.lastSelection,c=R(l.anchor,l.head);ee(t,o,c.line+1),r=t.listSelections().length,t.setCursor(o)}for(var u=0;u<r;u++){a&&t.setCursor(I(o,u,0));for(var f=0;f<n.length;f++){var p=n[f];if(p instanceof rt)e.lookupKey(p.keyName,"vim-insert",i);else{var d=t.getCursor();t.replaceRange(p,d,d)}}}a&&t.setCursor(I(o,0,1))}e.defineOption("vimMode",!1,function(t,n,r){n&&"vim"!=t.getOption("keyMap")?t.setOption("keyMap","vim"):!n&&r!=e.Init&&/^vim/.test(t.getOption("keyMap"))&&t.setOption("keyMap","default")});var st={Shift:"S",Ctrl:"C",Alt:"A",Cmd:"D",Mod:"A"},lt={Enter:"CR",Backspace:"BS",Delete:"Del",Insert:"Ins"},ct=/[\d]/,ut=[e.isWordChar,function(t){return t&&!e.isWordChar(t)&&!/\s/.test(t)}],ft=[function(e){return/\S/.test(e)}],pt=f(65,26),dt=f(97,26),ht=f(48,10),mt=[].concat(pt,dt,ht,["<",">"]),gt=[].concat(pt,dt,ht,["-",'"',".",":","/"]),vt={};x("filetype",void 0,"string",["ft"],function(e,t){if(void 0!==t){if(void 0===e){var n=t.getOption("mode");return"null"==n?"":n}var n=""==e?"null":e;t.setOption("mode",n)}});var yt=function(){function e(e,t,s){function l(t){var i=++r%n,o=a[i];o&&o.clear(),a[i]=e.setBookmark(t)}var c=r%n,u=a[c];if(u){var f=u.find();f&&!$(f,t)&&l(t)}else l(t);l(s),i=r,o=r-n+1,o<0&&(o=0)}function t(e,t){r+=t,r>i?r=i:r<o&&(r=o);var s=a[(n+r)%n];if(s&&!s.find()){var l,c=t>0?1:-1,u=e.getCursor();do if(r+=c,s=a[(n+r)%n],s&&(l=s.find())&&!$(u,l))break;while(r<i&&r>o)}return s}var n=100,r=-1,i=0,o=0,a=new Array(n);return{cachedCursor:void 0,add:e,move:t}},xt=function(e){return e?{changes:e.changes,expectCursorActivityForChange:e.expectCursorActivityForChange}:{changes:[],expectCursorActivityForChange:!1}};k.prototype={exitMacroRecordMode:function(){var e=bt.macroModeState;e.onRecordingDone&&e.onRecordingDone(),e.onRecordingDone=void 0,e.isRecording=!1},enterMacroRecordMode:function(e,t){var n=bt.registerController.getRegister(t);n&&(n.clear(),this.latestRegister=t,e.openDialog&&(this.onRecordingDone=e.openDialog("(recording)["+t+"]",null,{bottom:!0})),this.isRecording=!0)}};var bt,wt,kt={buildKeyMap:function(){},getRegisterController:function(){return bt.registerController},resetVimGlobalState_:C,getVimGlobalState_:function(){return bt},maybeInitVimState_:_,suppressErrorLogging:!1,InsertModeKey:rt,map:function(e,t,n){Nt.map(e,t,n)},unmap:function(e,t){Nt.unmap(e,t)},setOption:b,getOption:w,defineOption:x,defineEx:function(e,t,n){if(t){if(0!==e.indexOf(t))throw new Error('(Vim.defineEx) "'+t+'" is not a prefix of "'+e+'", command not registered')}else t=e;Dt[e]=n,Nt.commandMap_[t]={name:e,shortName:t,type:"api"}},handleKey:function(e,t,n){var r=this.findKey(e,t,n);if("function"==typeof r)return r()},findKey:function(n,r,i){function o(){var e=bt.macroModeState;if(e.isRecording){if("q"==r)return e.exitMacroRecordMode(),T(n),!0;"mapping"!=i&&Ye(e,r)}}function a(){if("<Esc>"==r)return T(n),f.visualMode?le(n):f.insertMode&&Ue(n),!0}function s(t){for(var i;t;)i=/<\w+-.+?>|<\w+>|./.exec(t),r=i[0],t=t.substring(i.index+r.length),e.Vim.handleKey(n,r,"mapping")}function l(){if(a())return!0;for(var e=f.inputState.keyBuffer=f.inputState.keyBuffer+r,i=1==r.length,o=_t.matchCommand(e,t,f.inputState,"insert");e.length>1&&"full"!=o.type;){var e=f.inputState.keyBuffer=e.slice(1),s=_t.matchCommand(e,t,f.inputState,"insert");"none"!=s.type&&(o=s)}if("none"==o.type)return T(n),!1;if("partial"==o.type)return wt&&window.clearTimeout(wt),wt=window.setTimeout(function(){f.insertMode&&f.inputState.keyBuffer&&T(n)},w("insertModeEscKeysTimeout")),!i;if(wt&&window.clearTimeout(wt),i){for(var l=n.listSelections(),c=0;c<l.length;c++){var u=l[c].head;n.replaceRange("",I(u,0,-(e.length-1)),u,"+input")}bt.macroModeState.lastInsertModeChanges.changes.pop()}return T(n),o.command}function c(){if(o()||a())return!0;var e=f.inputState.keyBuffer=f.inputState.keyBuffer+r;if(/^[1-9]\d*$/.test(e))return!0;var i=/^(\d*)(.*)$/.exec(e);if(!i)return T(n),!1;var s=f.visualMode?"visual":"normal",l=_t.matchCommand(i[2]||i[1],t,f.inputState,s);if("none"==l.type)return T(n),!1;if("partial"==l.type)return!0;f.inputState.keyBuffer="";var i=/^(\d*)(.*)$/.exec(e);return i[1]&&"0"!=i[1]&&f.inputState.pushRepeatDigit(i[1]),l.command}var u,f=_(n);return u=f.insertMode?l():c(),u===!1?void 0:u===!0?function(){return!0}:function(){return n.operation(function(){n.curOp.isVimOp=!0;try{"keyToKey"==u.type?s(u.toKeys):_t.processCommand(n,f,u)}catch(t){throw n.state.vim=void 0,_(n),e.Vim.suppressErrorLogging||console.log(t),t}return!0})}},handleEx:function(e,t){Nt.processCommand(e,t)},defineMotion:O,defineAction:N,defineOperator:D,mapCommand:Ge,_mapCommand:Ve,defineRegister:M,exitVisualMode:le,exitInsertMode:Ue};S.prototype.pushRepeatDigit=function(e){this.operator?this.motionRepeat=this.motionRepeat.concat(e):this.prefixRepeat=this.prefixRepeat.concat(e)},S.prototype.getRepeat=function(){var e=0;return(this.prefixRepeat.length>0||this.motionRepeat.length>0)&&(e=1,this.prefixRepeat.length>0&&(e*=parseInt(this.prefixRepeat.join(""),10)),this.motionRepeat.length>0&&(e*=parseInt(this.motionRepeat.join(""),10))),e},A.prototype={setText:function(e,t,n){this.keyBuffer=[e||""],this.linewise=!!t,this.blockwise=!!n},pushText:function(e,t){t&&(this.linewise||this.keyBuffer.push("\n"),this.linewise=!0),this.keyBuffer.push(e)},pushInsertModeChanges:function(e){this.insertModeChanges.push(xt(e))},pushSearchQuery:function(e){this.searchQueries.push(e)},clear:function(){this.keyBuffer=[],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!1},toString:function(){return this.keyBuffer.join("")}},L.prototype={pushText:function(e,t,n,r,i){r&&"\n"==n.charAt(0)&&(n=n.slice(1)+"\n"),r&&"\n"!==n.charAt(n.length-1)&&(n+="\n");var o=this.isValidRegister(e)?this.getRegister(e):null;if(!o){switch(t){case"yank":this.registers[0]=new A(n,r,i);break;case"delete":case"change":n.indexOf("\n")==-1?this.registers["-"]=new A(n,r):(this.shiftNumericRegisters_(),this.registers[1]=new A(n,r))}return void this.unnamedRegister.setText(n,r,i)}var a=g(e);a?o.pushText(n,r):o.setText(n,r,i),this.unnamedRegister.setText(o.toString(),r)},getRegister:function(e){return this.isValidRegister(e)?(e=e.toLowerCase(),this.registers[e]||(this.registers[e]=new A),this.registers[e]):this.unnamedRegister},isValidRegister:function(e){return e&&y(e,gt)},shiftNumericRegisters_:function(){for(var e=9;e>=2;e--)this.registers[e]=this.getRegister(""+(e-1))}},F.prototype={nextMatch:function(e,t){var n=this.historyBuffer,r=t?-1:1;null===this.initialPrefix&&(this.initialPrefix=e);for(var i=this.iterator+r;t?i>=0:i<n.length;i+=r)for(var o=n[i],a=0;a<=o.length;a++)if(this.initialPrefix==o.substring(0,a))return this.iterator=i,o;return i>=n.length?(this.iterator=n.length,this.initialPrefix):i<0?e:void 0},pushInput:function(e){var t=this.historyBuffer.indexOf(e);t>-1&&this.historyBuffer.splice(t,1),e.length&&this.historyBuffer.push(e)},reset:function(){this.initialPrefix=null,this.iterator=this.historyBuffer.length}};var _t={
0 ignored issues
show
Complexity Best Practice introduced by
There is no return statement if 0 === t.0 is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Comprehensibility Naming Best Practice introduced by
The variable o already seems to be declared on line 11. Consider using another variable name or omitting the var keyword.

This check looks for variables that are declared in multiple lines. There may be several reasons for this.

In the simplest case the variable name was reused by mistake. This may lead to very hard to locate bugs.

If you want to reuse a variable for another purpose, consider declaring it at or near the top of your function and just assigning to it subsequently so it is always declared.

Loading history...
Complexity Best Practice introduced by
There is no return statement if void(0) !== t is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Comprehensibility introduced by
Usage of the sequence operator is discouraged, since it may lead to obfuscated code.

The sequence or comma operator allows the inclusion of multiple expressions where only is permitted. The result of the sequence is the value of the last expression.

This operator is most often used in for statements.

Used in another places it can make code hard to read, especially when people do not realize it even exists as a seperate operator.

This check looks for usage of the sequence operator in locations where it is not necessary and could be replaced by a series of expressions or statements.

var a,b,c;

a = 1, b = 1,  c= 3;

could just as well be written as:

var a,b,c;

a = 1;
b = 1;
c = 3;

To learn more about the sequence operator, please refer to the MDN.

Loading history...
Comprehensibility Naming Best Practice introduced by
The variable i already seems to be declared on line 11. Consider using another variable name or omitting the var keyword.

This check looks for variables that are declared in multiple lines. There may be several reasons for this.

In the simplest case the variable name was reused by mistake. This may lead to very hard to locate bugs.

If you want to reuse a variable for another purpose, consider declaring it at or near the top of your function and just assigning to it subsequently so it is always declared.

Loading history...
Complexity Best Practice introduced by
There is no return statement if o is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Bug introduced by
The variable r is changed as part of the for loop for example by i.0 on line 11. Only the value of the last iteration will be visible in this function if it is called after the loop.
Loading history...
Bug introduced by
The variable o seems to not be initialized for all possible execution paths.
Loading history...
Complexity Best Practice introduced by
There is no return statement if "<Esc>" == r is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Coding Style Best Practice introduced by
By convention, constructors like k should be capitalized.
Loading history...
Unused Code introduced by
The assignment to variable d seems to be never used. Consider removing it.
Loading history...
Coding Style Best Practice introduced by
By convention, constructors like rt should be capitalized.
Loading history...
Complexity introduced by
A for in loop automatically includes the property of any prototype object, consider checking the key using hasOwnProperty.

When iterating over the keys of an object, this includes not only the keys of the object, but also keys contained in the prototype of that object. It is generally a best practice to check for these keys specifically:

var someObject;
for (var key in someObject) {
    if ( ! someObject.hasOwnProperty(key)) {
        continue; // Skip keys from the prototype.
    }

    doSomethingWith(key);
}
Loading history...
Unused Code introduced by
The assignment to variable f seems to be never used. Consider removing it.
Loading history...
Bug introduced by
The variable a seems to not be initialized for all possible execution paths.
Loading history...
Complexity Best Practice introduced by
There is no return statement if t is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Bug introduced by
The call to o seems to have too many arguments starting with !1.
Loading history...
Complexity Best Practice introduced by
There is no return statement if "function" == typeof r is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Coding Style Best Practice introduced by
Curly braces around statements make for more readable code and help prevent bugs when you add further statements.

Consider adding curly braces around all statements when they are executed conditionally. This is optional if there is only one statement, but leaving them out can lead to unexpected behaviour if another statement is added later.

Consider:

if (a > 0)
    b = 42;

If you or someone else later decides to put another statement in, only the first statement will be executed.

if (a > 0)
    console.log("a > 0");
    b = 42;

In this case the statement b = 42 will always be executed, while the logging statement will be executed conditionally.

if (a > 0) {
    console.log("a > 0");
    b = 42;
}

ensures that the proper code will be executed conditionally no matter how many statements are added or removed.

Loading history...
Debugging Code introduced by
console.log looks like debug code. Are you sure you do not want to remove it?
Loading history...
Complexity Best Practice introduced by
There is no return statement if n is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Complexity Best Practice introduced by
There is no return statement if "block" == n is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Comprehensibility Naming Best Practice introduced by
The variable n already seems to be declared on line 11. Consider using another variable name or omitting the var keyword.

This check looks for variables that are declared in multiple lines. There may be several reasons for this.

In the simplest case the variable name was reused by mistake. This may lead to very hard to locate bugs.

If you want to reuse a variable for another purpose, consider declaring it at or near the top of your function and just assigning to it subsequently so it is always declared.

Loading history...
Bug introduced by
The variable o seems to not be initialized for all possible execution paths. Are you sure r handles undefined variables?
Loading history...
Comprehensibility Naming Best Practice introduced by
The variable e already seems to be declared on line 11. Consider using another variable name or omitting the var keyword.

This check looks for variables that are declared in multiple lines. There may be several reasons for this.

In the simplest case the variable name was reused by mistake. This may lead to very hard to locate bugs.

If you want to reuse a variable for another purpose, consider declaring it at or near the top of your function and just assigning to it subsequently so it is always declared.

Loading history...
Unused Code introduced by
The assignment to variable l seems to be never used. Consider removing it.
Loading history...
introduced by
The for loop does not have a body. Maybe you have misplaced a semicolon. If you do wish to have a loop without a body, use an empty body {}.
Loading history...
Complexity Best Practice introduced by
There is no return statement if e.isRecording is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Coding Style introduced by
As per coding-style, switch statements should have a default case.
Loading history...
Best Practice introduced by
There is no return statement in this branch, but you do return something in other branches. Did you maybe miss it? If you do not want to return anything, consider adding return undefined; explicitly.
Loading history...
Unused Code introduced by
The assignment to variable s seems to be never used. Consider removing it.
Loading history...
Comprehensibility Naming Best Practice introduced by
The variable s already seems to be declared on line 11. Consider using another variable name or omitting the var keyword.

This check looks for variables that are declared in multiple lines. There may be several reasons for this.

In the simplest case the variable name was reused by mistake. This may lead to very hard to locate bugs.

If you want to reuse a variable for another purpose, consider declaring it at or near the top of your function and just assigning to it subsequently so it is always declared.

Loading history...
Bug introduced by
The variable r is changed as part of the loop loop for example by c on line 11. Only the value of the last iteration will be visible in this function if it is called after the loop.
Loading history...
Coding Style introduced by
Consider using undefined instead of void(0). It is equivalent and more straightforward to read.
Loading history...
Coding Style Best Practice introduced by
By convention, constructors like r should be capitalized.
Loading history...
Complexity Best Practice introduced by
There is no return statement if "local" !== i is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
12
matchCommand:function(e,t,n,r){var i=q(e,t,r,n);if(!i.full&&!i.partial)return{type:"none"};if(!i.full&&i.partial)return{type:"partial"};for(var o,a=0;a<i.full.length;a++){var s=i.full[a];o||(o=s)}return"<character>"==o.keys.slice(-11)&&(n.selectedCharacter=z(e)),{type:"full",command:o}},processCommand:function(e,t,n){switch(t.inputState.repeatOverride=n.repeatOverride,n.type){case"motion":this.processMotion(e,t,n);break;case"operator":this.processOperator(e,t,n);break;case"operatorMotion":this.processOperatorMotion(e,t,n);break;case"action":this.processAction(e,t,n);break;case"search":this.processSearch(e,t,n);break;case"ex":case"keyToEx":this.processEx(e,t,n)}},processMotion:function(e,t,n){t.inputState.motion=n.motion,t.inputState.motionArgs=P(n.motionArgs),this.evalInput(e,t)},processOperator:function(e,t,n){var r=t.inputState;if(r.operator){if(r.operator==n.operator)return r.motion="expandToLine",r.motionArgs={linewise:!0},void this.evalInput(e,t);T(e)}r.operator=n.operator,r.operatorArgs=P(n.operatorArgs),t.visualMode&&this.evalInput(e,t)},processOperatorMotion:function(e,t,n){var r=t.visualMode,i=P(n.operatorMotionArgs);i&&r&&i.visualLine&&(t.visualLine=!0),this.processOperator(e,t,n),r||this.processMotion(e,t,n)},processAction:function(e,t,n){var r=t.inputState,i=r.getRepeat(),o=!!i,a=P(n.actionArgs)||{};r.selectedCharacter&&(a.selectedCharacter=r.selectedCharacter),n.operator&&this.processOperator(e,t,n),n.motion&&this.processMotion(e,t,n),(n.motion||n.operator)&&this.evalInput(e,t),a.repeat=i||1,a.repeatIsExplicit=o,a.registerName=r.registerName,T(e),t.lastMotion=null,n.isEdit&&this.recordLastEdit(t,r,n),Tt[n.action](e,a,t)},processSearch:function(t,n,r){function i(e,i,o){bt.searchHistoryController.pushInput(e),bt.searchHistoryController.reset();try{Re(t,e,i,o)}catch(n){return Ne(t,"Invalid regex: "+e),void T(t)}_t.processMotion(t,n,{type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:r.searchArgs.toJumplist}})}function o(e){t.scrollTo(p.left,p.top),i(e,!0,!0);var n=bt.macroModeState;n.isRecording&&Qe(n,e)}function a(n,r,i){var o,a=e.keyName(n);"Up"==a||"Down"==a?(o="Up"==a,r=bt.searchHistoryController.nextMatch(r,o)||"",i(r)):"Left"!=a&&"Right"!=a&&"Ctrl"!=a&&"Alt"!=a&&"Shift"!=a&&bt.searchHistoryController.reset();var s;try{s=Re(t,r,!0,!0)}catch(e){}s?t.scrollIntoView(ze(t,!l,s),30):(He(t),t.scrollTo(p.left,p.top))}function s(n,r,i){var o=e.keyName(n);"Esc"==o||"Ctrl-C"==o||"Ctrl-["==o||"Backspace"==o&&""==r?(bt.searchHistoryController.pushInput(r),bt.searchHistoryController.reset(),Re(t,f),He(t),t.scrollTo(p.left,p.top),e.e_stop(n),T(t),i(),t.focus()):"Ctrl-U"==o&&(e.e_stop(n),i(""))}if(t.getSearchCursor){var l=r.searchArgs.forward,c=r.searchArgs.wholeWordOnly;Te(t).setReversed(!l);var u=l?"/":"?",f=Te(t).getQuery(),p=t.getScrollInfo();switch(r.searchArgs.querySrc){case"prompt":var d=bt.macroModeState;if(d.isPlaying){var h=d.replaySearchQueries.shift();i(h,!0,!1)}else Pe(t,{onClose:o,prefix:u,desc:Ot,onKeyUp:a,onKeyDown:s});break;case"wordUnderCursor":var m=pe(t,!1,!0,!1,!0),g=!0;if(m||(m=pe(t,!1,!0,!1,!1),g=!1),!m)return;var h=t.getLine(m.start.line).substring(m.start.ch,m.end.ch);h=g&&c?"\\b"+h+"\\b":J(h),bt.jumpList.cachedCursor=t.getCursor(),t.setCursor(m.start),i(h,!0,!1)}}},processEx:function(t,n,r){function i(e){bt.exCommandHistoryController.pushInput(e),bt.exCommandHistoryController.reset(),Nt.processCommand(t,e)}function o(n,r,i){var o,a=e.keyName(n);("Esc"==a||"Ctrl-C"==a||"Ctrl-["==a||"Backspace"==a&&""==r)&&(bt.exCommandHistoryController.pushInput(r),bt.exCommandHistoryController.reset(),e.e_stop(n),T(t),i(),t.focus()),"Up"==a||"Down"==a?(o="Up"==a,r=bt.exCommandHistoryController.nextMatch(r,o)||"",i(r)):"Ctrl-U"==a?(e.e_stop(n),i("")):"Left"!=a&&"Right"!=a&&"Ctrl"!=a&&"Alt"!=a&&"Shift"!=a&&bt.exCommandHistoryController.reset()}"keyToEx"==r.type?Nt.processCommand(t,r.exArgs.input):n.visualMode?Pe(t,{onClose:i,prefix:":",value:"'<,'>",onKeyDown:o}):Pe(t,{onClose:i,prefix:":",onKeyDown:o})},evalInput:function(e,t){var n,i,o,a=t.inputState,s=a.motion,l=a.motionArgs||{},c=a.operator,u=a.operatorArgs||{},f=a.registerName,p=t.sel,d=W(t.visualMode?j(e,p.head):e.getCursor("head")),h=W(t.visualMode?j(e,p.anchor):e.getCursor("anchor")),m=W(d),g=W(h);if(c&&this.recordLastEdit(t,a),o=void 0!==a.repeatOverride?a.repeatOverride:a.getRepeat(),o>0&&l.explicitRepeat?l.repeatIsExplicit=!0:(l.noRepeat||!l.explicitRepeat&&0===o)&&(o=1,l.repeatIsExplicit=!1),a.selectedCharacter&&(l.selectedCharacter=u.selectedCharacter=a.selectedCharacter),l.repeat=o,T(e),s){var v=Ct[s](e,d,l,t);if(t.lastMotion=Ct[s],!v)return;if(l.toJumplist){var y=bt.jumpList,x=y.cachedCursor;x?(de(e,x,v),delete y.cachedCursor):de(e,d,v)}v instanceof Array?(i=v[0],n=v[1]):n=v,n||(n=W(d)),t.visualMode?(t.visualBlock&&n.ch===1/0||(n=j(e,n,t.visualBlock)),i&&(i=j(e,i,!0)),i=i||g,p.anchor=i,p.head=n,oe(e),be(e,t,"<",K(i,n)?i:n),be(e,t,">",K(i,n)?n:i)):c||(n=j(e,n),e.setCursor(n.line,n.ch))}if(c){if(u.lastSel){i=g;var b=u.lastSel,w=Math.abs(b.head.line-b.anchor.line),k=Math.abs(b.head.ch-b.anchor.ch);n=b.visualLine?r(g.line+w,g.ch):b.visualBlock?r(g.line+w,g.ch+k):b.head.line==b.anchor.line?r(g.line,g.ch+k):r(g.line+w,g.ch),t.visualMode=!0,t.visualLine=b.visualLine,t.visualBlock=b.visualBlock,p=t.sel={anchor:i,head:n},oe(e)}else t.visualMode&&(u.lastSel={anchor:W(p.anchor),head:W(p.head),visualBlock:t.visualBlock,visualLine:t.visualLine});var _,C,S,A,M;if(t.visualMode){if(_=U(p.head,p.anchor),C=V(p.head,p.anchor),S=t.visualLine||u.linewise,A=t.visualBlock?"block":S?"line":"char",M=ae(e,{anchor:_,head:C},A),S){var L=M.ranges;if("block"==A)for(var F=0;F<L.length;F++)L[F].head.ch=X(e,L[F].head.line);else"line"==A&&(L[0].head=r(L[0].head.line+1,0))}}else{if(_=W(i||g),C=W(n||m),K(C,_)){var O=_;_=C,C=O}S=l.linewise||u.linewise,S?ue(e,_,C):l.forward&&ce(e,_,C),A="char";var E=!l.inclusive||S;M=ae(e,{anchor:_,head:C},A,E)}e.setSelections(M.ranges,M.primary),t.lastMotion=null,u.repeat=o,u.registerName=f,u.linewise=S;var D=St[c](e,u,M.ranges,g,n);t.visualMode&&le(e,null!=D),D&&e.setCursor(D)}},recordLastEdit:function(e,t,n){var r=bt.macroModeState;r.isPlaying||(e.lastEditInputState=t,e.lastEditActionCommand=n,r.lastInsertModeChanges.changes=[],r.lastInsertModeChanges.expectCursorActivityForChange=!1)}},Ct={moveToTopLine:function(e,t,n){var i=$e(e).top+n.repeat-1;return r(i,fe(e.getLine(i)))},moveToMiddleLine:function(e){var t=$e(e),n=Math.floor(.5*(t.top+t.bottom));return r(n,fe(e.getLine(n)))},moveToBottomLine:function(e,t,n){var i=$e(e).bottom-n.repeat+1;return r(i,fe(e.getLine(i)))},expandToLine:function(e,t,n){var i=t;return r(i.line+n.repeat-1,1/0)},findNext:function(e,t,n){var r=Te(e),i=r.getQuery();if(i){var o=!n.forward;return o=r.isReversed()?!o:o,Be(e,i),ze(e,o,i,n.repeat)}},goToMark:function(e,t,n,r){var i=r.marks[n.selectedCharacter];if(i){var o=i.find();return n.linewise?{line:o.line,ch:fe(e.getLine(o.line))}:o}return null},moveToOtherHighlightedEnd:function(e,t,n,i){if(i.visualBlock&&n.sameLine){var o=i.sel;return[j(e,r(o.anchor.line,o.head.ch)),j(e,r(o.head.line,o.anchor.ch))]}return[i.sel.head,i.sel.anchor]},jumpToMark:function(e,t,n,i){for(var o=t,a=0;a<n.repeat;a++){var s=o;for(var l in i.marks)if(d(l)){var c=i.marks[l].find(),u=n.forward?K(c,s):K(s,c);if(!(u||n.linewise&&c.line==s.line)){var f=$(s,o),p=n.forward?G(s,c,o):G(o,c,s);(f||p)&&(o=c)}}}return n.linewise&&(o=r(o.line,fe(e.getLine(o.line)))),o},moveByCharacters:function(e,t,n){var i=t,o=n.repeat,a=n.forward?i.ch+o:i.ch-o;return r(i.line,a)},moveByLines:function(e,t,n,i){var o=t,a=o.ch;switch(i.lastMotion){case this.moveByLines:case this.moveByDisplayLines:case this.moveByScroll:case this.moveToColumn:case this.moveToEol:a=i.lastHPos;break;default:i.lastHPos=a}var s=n.repeat+(n.repeatOffset||0),l=n.forward?o.line+s:o.line-s,c=e.firstLine(),u=e.lastLine();return l<c&&o.line==c?this.moveToStartOfLine(e,t,n,i):l>u&&o.line==u?this.moveToEol(e,t,n,i):(n.toFirstChar&&(a=fe(e.getLine(l)),i.lastHPos=a),i.lastHSPos=e.charCoords(r(l,a),"div").left,r(l,a))},moveByDisplayLines:function(e,t,n,i){var o=t;switch(i.lastMotion){case this.moveByDisplayLines:case this.moveByScroll:case this.moveByLines:case this.moveToColumn:case this.moveToEol:break;default:i.lastHSPos=e.charCoords(o,"div").left}var a=n.repeat,s=e.findPosV(o,n.forward?a:-a,"line",i.lastHSPos);if(s.hitSide)if(n.forward)var l=e.charCoords(s,"div"),c={top:l.top+8,left:i.lastHSPos},s=e.coordsChar(c,"div");else{var u=e.charCoords(r(e.firstLine(),0),"div");u.left=i.lastHSPos,s=e.coordsChar(u,"div")}return i.lastHPos=s.ch,s},moveByPage:function(e,t,n){var r=t,i=n.repeat;return e.findPosV(r,n.forward?i:-i,"page")},moveByParagraph:function(e,t,n){var r=n.forward?1:-1;return ke(e,t,n.repeat,r)},moveByScroll:function(e,t,n,r){var i=e.getScrollInfo(),o=null,a=n.repeat;a||(a=i.clientHeight/(2*e.defaultTextHeight()));var s=e.charCoords(t,"local");n.repeat=a;var o=Ct.moveByDisplayLines(e,t,n,r);if(!o)return null;var l=e.charCoords(o,"local");return e.scrollTo(null,i.top+l.top-s.top),o},moveByWords:function(e,t,n){return ve(e,t,n.repeat,!!n.forward,!!n.wordEnd,!!n.bigWord)},moveTillCharacter:function(e,t,n){var r=n.repeat,i=ye(e,r,n.forward,n.selectedCharacter),o=n.forward?-1:1;return he(o,n),i?(i.ch+=o,i):null},moveToCharacter:function(e,t,n){var r=n.repeat;return he(0,n),ye(e,r,n.forward,n.selectedCharacter)||t},moveToSymbol:function(e,t,n){var r=n.repeat;return me(e,r,n.forward,n.selectedCharacter)||t},moveToColumn:function(e,t,n,r){var i=n.repeat;return r.lastHPos=i-1,r.lastHSPos=e.charCoords(t,"div").left,xe(e,i)},moveToEol:function(e,t,n,i){var o=t;i.lastHPos=1/0;var a=r(o.line+n.repeat-1,1/0),s=e.clipPos(a);return s.ch--,i.lastHSPos=e.charCoords(s,"div").left,a},moveToFirstNonWhiteSpaceCharacter:function(e,t){var n=t;return r(n.line,fe(e.getLine(n.line)))},moveToMatchedSymbol:function(e,t){var n,i=t,o=i.line,a=i.ch,s=e.getLine(o);do if(n=s.charAt(a++),n&&h(n)){var l=e.getTokenTypeAt(r(o,a));if("string"!==l&&"comment"!==l)break}while(n);if(n){var c=e.findMatchingBracket(r(o,a));return c.to}return i},moveToStartOfLine:function(e,t){return r(t.line,0)},moveToLineOrEdgeOfDocument:function(e,t,n){var i=n.forward?e.lastLine():e.firstLine();return n.repeatIsExplicit&&(i=n.repeat-e.getOption("firstLineNumber")),r(i,fe(e.getLine(i)))},textObjectManipulation:function(e,t,n,r){var i={"(":")",")":"(","{":"}","}":"{","[":"]","]":"["},o={"'":!0,'"':!0},a=n.selectedCharacter;"b"==a?a="(":"B"==a&&(a="{");var s,l=!n.textObjectInner;if(i[a])s=_e(e,t,a,l);else if(o[a])s=Ce(e,t,a,l);else if("W"===a)s=pe(e,l,!0,!0);else if("w"===a)s=pe(e,l,!0,!1);else{if("p"!==a)return null;if(s=ke(e,t,n.repeat,0,l),n.linewise=!0,r.visualMode)r.visualLine||(r.visualLine=!0);else{var c=r.inputState.operatorArgs;c&&(c.linewise=!0),s.end.line--}}return e.state.vim.visualMode?ie(e,s.start,s.end):[s.start,s.end]},repeatLastCharacterSearch:function(e,t,n){var r=bt.lastCharacterSearch,i=n.repeat,o=n.forward===r.forward,a=(r.increment?1:0)*(o?-1:1);e.moveH(-a,"char"),n.inclusive=!!o;var s=ye(e,i,o,r.selectedCharacter);return s?(s.ch+=a,s):(e.moveH(a,"char"),t)}},St={change:function(t,n,i){var o,a,s=t.state.vim;if(bt.macroModeState.lastInsertModeChanges.inVisualBlock=s.visualBlock,s.visualMode){a=t.getSelection();var l=E("",i.length);t.replaceSelections(l),o=U(i[0].head,i[0].anchor)}else{var c=i[0].anchor,u=i[0].head;a=t.getRange(c,u);var f=s.lastEditInputState||{};if("moveByWords"==f.motion&&!v(a)){var p=/\s+$/.exec(a);p&&f.motionArgs&&f.motionArgs.forward&&(u=I(u,0,-p[0].length),a=a.slice(0,-p[0].length))}var d=new r(c.line-1,Number.MAX_VALUE),h=t.firstLine()==t.lastLine();u.line>t.lastLine()&&n.linewise&&!h?t.replaceRange("",d,u):t.replaceRange("",c,u),n.linewise&&(h||(t.setCursor(d),e.commands.newlineAndIndent(t)),c.ch=Number.MAX_VALUE),o=c}bt.registerController.pushText(n.registerName,"change",a,n.linewise,i.length>1),Tt.enterInsertMode(t,{head:o},t.state.vim)},delete:function(e,t,n){var i,o,a=e.state.vim;if(a.visualBlock){o=e.getSelection();var s=E("",n.length);e.replaceSelections(s),i=n[0].anchor}else{var l=n[0].anchor,c=n[0].head;t.linewise&&c.line!=e.firstLine()&&l.line==e.lastLine()&&l.line==c.line-1&&(l.line==e.firstLine()?l.ch=0:l=r(l.line-1,X(e,l.line-1))),o=e.getRange(l,c),e.replaceRange("",l,c),i=l,t.linewise&&(i=Ct.moveToFirstNonWhiteSpaceCharacter(e,l))}return bt.registerController.pushText(t.registerName,"delete",o,t.linewise,a.visualBlock),j(e,i)},indent:function(e,t,n){var r=e.state.vim,i=n[0].anchor.line,o=r.visualBlock?n[n.length-1].anchor.line:n[0].head.line,a=r.visualMode?t.repeat:1;t.linewise&&o--;for(var s=i;s<=o;s++)for(var l=0;l<a;l++)e.indentLine(s,t.indentRight);return Ct.moveToFirstNonWhiteSpaceCharacter(e,n[0].anchor)},changeCase:function(e,t,n,r,i){for(var o=e.getSelections(),a=[],s=t.toLower,l=0;l<o.length;l++){var c=o[l],u="";if(s===!0)u=c.toLowerCase();else if(s===!1)u=c.toUpperCase();else for(var f=0;f<c.length;f++){var p=c.charAt(f);u+=g(p)?p.toLowerCase():p.toUpperCase()}a.push(u)}return e.replaceSelections(a),t.shouldMoveCursor?i:!e.state.vim.visualMode&&t.linewise&&n[0].anchor.line+1==n[0].head.line?Ct.moveToFirstNonWhiteSpaceCharacter(e,r):t.linewise?r:U(n[0].anchor,n[0].head)},yank:function(e,t,n,r){var i=e.state.vim,o=e.getSelection(),a=i.visualMode?U(i.sel.anchor,i.sel.head,n[0].head,n[0].anchor):r;return bt.registerController.pushText(t.registerName,"yank",o,t.linewise,i.visualBlock),a}},Tt={jumpListWalk:function(e,t,n){if(!n.visualMode){var r=t.repeat,i=t.forward,o=bt.jumpList,a=o.move(e,i?r:-r),s=a?a.find():void 0;s=s?s:e.getCursor(),e.setCursor(s)}},scroll:function(e,t,n){if(!n.visualMode){var r=t.repeat||1,i=e.defaultTextHeight(),o=e.getScrollInfo().top,a=i*r,s=t.forward?o+a:o-a,l=W(e.getCursor()),c=e.charCoords(l,"local");if(t.forward)s>c.top?(l.line+=(s-c.top)/i,l.line=Math.ceil(l.line),e.setCursor(l),c=e.charCoords(l,"local"),e.scrollTo(null,c.top)):e.scrollTo(null,s);else{var u=s+e.getScrollInfo().clientHeight;u<c.bottom?(l.line-=(c.bottom-u)/i,l.line=Math.floor(l.line),e.setCursor(l),c=e.charCoords(l,"local"),e.scrollTo(null,c.bottom-e.getScrollInfo().clientHeight)):e.scrollTo(null,s)}}},scrollToCursor:function(e,t){var n=e.getCursor().line,i=e.charCoords(r(n,0),"local"),o=e.getScrollInfo().clientHeight,a=i.top,s=i.bottom-a;switch(t.position){case"center":a=a-o/2+s;break;case"bottom":a=a-o+s}e.scrollTo(null,a)},replayMacro:function(e,t,n){var r=t.selectedCharacter,i=t.repeat,o=bt.macroModeState;for("@"==r&&(r=o.latestRegister);i--;)Xe(e,n,o,r)},enterMacroRecordMode:function(e,t){var n=bt.macroModeState,r=t.selectedCharacter;n.enterMacroRecordMode(e,r)},toggleOverwrite:function(t){t.state.overwrite?(t.toggleOverwrite(!1),t.setOption("keyMap","vim-insert"),e.signal(t,"vim-mode-change",{mode:"insert"})):(t.toggleOverwrite(!0),t.setOption("keyMap","vim-replace"),e.signal(t,"vim-mode-change",{mode:"replace"}))},enterInsertMode:function(t,n,i){if(!t.getOption("readOnly")){i.insertMode=!0,i.insertModeRepeat=n&&n.repeat||1;var o=n?n.insertAt:null,a=i.sel,s=n.head||t.getCursor("head"),l=t.listSelections().length;if("eol"==o)s=r(s.line,X(t,s.line));else if("charAfter"==o)s=I(s,0,1);else if("firstNonBlank"==o)s=Ct.moveToFirstNonWhiteSpaceCharacter(t,s);else if("startOfSelectedArea"==o)i.visualBlock?(s=r(Math.min(a.head.line,a.anchor.line),Math.min(a.head.ch,a.anchor.ch)),l=Math.abs(a.head.line-a.anchor.line)+1):s=a.head.line<a.anchor.line?a.head:r(a.anchor.line,0);else if("endOfSelectedArea"==o)i.visualBlock?(s=r(Math.min(a.head.line,a.anchor.line),Math.max(a.head.ch+1,a.anchor.ch)),l=Math.abs(a.head.line-a.anchor.line)+1):s=a.head.line>=a.anchor.line?I(a.head,0,1):r(a.anchor.line,0);else if("inplace"==o&&i.visualMode)return;t.setOption("disableInput",!1),n&&n.replace?(t.toggleOverwrite(!0),t.setOption("keyMap","vim-replace"),e.signal(t,"vim-mode-change",{mode:"replace"})):(t.toggleOverwrite(!1),t.setOption("keyMap","vim-insert"),e.signal(t,"vim-mode-change",{mode:"insert"})),bt.macroModeState.isPlaying||(t.on("change",Ze),e.on(t.getInputField(),"keydown",it)),i.visualMode&&le(t),ee(t,s,l)}},toggleVisualMode:function(t,n,i){var o,a=n.repeat,s=t.getCursor();i.visualMode?i.visualLine^n.linewise||i.visualBlock^n.blockwise?(i.visualLine=!!n.linewise,i.visualBlock=!!n.blockwise,e.signal(t,"vim-mode-change",{mode:"visual",subMode:i.visualLine?"linewise":i.visualBlock?"blockwise":""}),oe(t)):le(t):(i.visualMode=!0,i.visualLine=!!n.linewise,i.visualBlock=!!n.blockwise,o=j(t,r(s.line,s.ch+a-1),!0),i.sel={anchor:s,head:o},e.signal(t,"vim-mode-change",{mode:"visual",subMode:i.visualLine?"linewise":i.visualBlock?"blockwise":""}),oe(t),be(t,i,"<",U(s,o)),be(t,i,">",V(s,o)))},reselectLastSelection:function(t,n,r){var i=r.lastSelection;if(r.visualMode&&re(t,r),i){var o=i.anchorMark.find(),a=i.headMark.find();if(!o||!a)return;r.sel={anchor:o,head:a},r.visualMode=!0,r.visualLine=i.visualLine,r.visualBlock=i.visualBlock,oe(t),be(t,r,"<",U(o,a)),be(t,r,">",V(o,a)),e.signal(t,"vim-mode-change",{mode:"visual",subMode:r.visualLine?"linewise":r.visualBlock?"blockwise":""})}},joinLines:function(e,t,n){var i,o;if(n.visualMode){if(i=e.getCursor("anchor"),o=e.getCursor("head"),K(o,i)){var a=o;o=i,i=a}o.ch=X(e,o.line)-1}else{var s=Math.max(t.repeat,2);i=e.getCursor(),o=j(e,r(i.line+s-1,1/0))}for(var l=0,c=i.line;c<o.line;c++){l=X(e,i.line);var a=r(i.line+1,X(e,i.line+1)),u=e.getRange(i,a);u=u.replace(/\n\s*/g," "),e.replaceRange(u,i,a)}var f=r(i.line,l);n.visualMode&&le(e,!1),e.setCursor(f)},newLineAndEnterInsertMode:function(t,n,i){i.insertMode=!0;var o=W(t.getCursor());if(o.line!==t.firstLine()||n.after){o.line=n.after?o.line:o.line-1,o.ch=X(t,o.line),t.setCursor(o);var a=e.commands.newlineAndIndentContinueComment||e.commands.newlineAndIndent;a(t)}else t.replaceRange("\n",r(t.firstLine(),0)),t.setCursor(t.firstLine(),0);this.enterInsertMode(t,{repeat:n.repeat},i)},paste:function(e,t,n){var i=W(e.getCursor()),o=bt.registerController.getRegister(t.registerName),a=o.toString();if(a){if(t.matchIndent){var s=e.getOption("tabSize"),l=function(e){var t=e.split("\t").length-1,n=e.split(" ").length-1;return t*s+1*n},c=e.getLine(e.getCursor().line),u=l(c.match(/^\s*/)[0]),f=a.replace(/\n$/,""),p=a!==f,d=l(a.match(/^\s*/)[0]),a=f.replace(/^\s*/gm,function(t){var n=u+(l(t)-d);if(n<0)return"";if(e.getOption("indentWithTabs")){var r=Math.floor(n/s);return Array(r+1).join("\t")}return Array(n+1).join(" ")});a+=p?"\n":""}if(t.repeat>1)var a=Array(t.repeat+1).join(a);var h=o.linewise,m=o.blockwise;if(h)n.visualMode?a=n.visualLine?a.slice(0,-1):"\n"+a.slice(0,a.length-1)+"\n":t.after?(a="\n"+a.slice(0,a.length-1),i.ch=X(e,i.line)):i.ch=0;else{if(m){a=a.split("\n");for(var g=0;g<a.length;g++)a[g]=""==a[g]?" ":a[g]}i.ch+=t.after?1:0}var v,y;if(n.visualMode){n.lastPastedText=a;var x,b=ne(e,n),w=b[0],k=b[1],_=e.getSelection(),C=e.listSelections(),S=new Array(C.length).join("1").split("1");n.lastSelection&&(x=n.lastSelection.headMark.find()),bt.registerController.unnamedRegister.setText(_),m?(e.replaceSelections(S),k=r(w.line+a.length-1,w.ch),e.setCursor(w),Z(e,k),e.replaceSelections(a),v=w):n.visualBlock?(e.replaceSelections(S),e.setCursor(w),e.replaceRange(a,w,w),v=w):(e.replaceRange(a,w,k),v=e.posFromIndex(e.indexFromPos(w)+a.length-1)),x&&(n.lastSelection.headMark=e.setBookmark(x)),h&&(v.ch=0)}else if(m){e.setCursor(i);for(var g=0;g<a.length;g++){var T=i.line+g;T>e.lastLine()&&e.replaceRange("\n",r(T,0));var A=X(e,T);A<i.ch&&Q(e,T,i.ch)}e.setCursor(i),Z(e,r(i.line+a.length-1,i.ch)),e.replaceSelections(a),v=i}else e.replaceRange(a,i),h&&t.after?v=r(i.line+1,fe(e.getLine(i.line+1))):h&&!t.after?v=r(i.line,fe(e.getLine(i.line))):!h&&t.after?(y=e.indexFromPos(i),v=e.posFromIndex(y+a.length-1)):(y=e.indexFromPos(i),v=e.posFromIndex(y+a.length));n.visualMode&&le(e,!1),e.setCursor(v)}},undo:function(t,n){t.operation(function(){H(t,e.commands.undo,n.repeat)(),t.setCursor(t.getCursor("anchor"))})},redo:function(t,n){H(t,e.commands.redo,n.repeat)()},setRegister:function(e,t,n){n.inputState.registerName=t.selectedCharacter},setMark:function(e,t,n){var r=t.selectedCharacter;be(e,n,r,e.getCursor())},replace:function(t,n,i){var o,a,s=n.selectedCharacter,l=t.getCursor(),c=t.listSelections();if(i.visualMode)l=t.getCursor("start"),a=t.getCursor("end");else{var u=t.getLine(l.line);o=l.ch+n.repeat,o>u.length&&(o=u.length),a=r(l.line,o)}if("\n"==s)i.visualMode||t.replaceRange("",l,a),(e.commands.newlineAndIndentContinueComment||e.commands.newlineAndIndent)(t);else{var f=t.getRange(l,a);if(f=f.replace(/[^\n]/g,s),i.visualBlock){var p=new Array(t.getOption("tabSize")+1).join(" ");f=t.getSelection(),f=f.replace(/\t/g,p).replace(/[^\n]/g,s).split("\n"),t.replaceSelections(f)}else t.replaceRange(f,l,a);i.visualMode?(l=K(c[0].anchor,c[0].head)?c[0].anchor:c[0].head,t.setCursor(l),le(t,!1)):t.setCursor(I(a,0,-1))}},incrementNumberToken:function(e,t){for(var n,i,o,a,s,l=e.getCursor(),c=e.getLine(l.line),u=/-?\d+/g;null!==(n=u.exec(c))&&(s=n[0],i=n.index,o=i+s.length,!(l.ch<o)););if((t.backtrack||!(o<=l.ch))&&s){var f=t.increase?1:-1,p=parseInt(s)+f*t.repeat,d=r(l.line,i),h=r(l.line,o);a=p.toString(),e.replaceRange(a,d,h),e.setCursor(r(l.line,i+a.length-1))}},repeatLastEdit:function(e,t,n){var r=n.lastEditInputState;if(r){var i=t.repeat;i&&t.repeatIsExplicit?n.lastEditInputState.repeatOverride=i:i=n.lastEditInputState.repeatOverride||i,ot(e,n,i,!1)}},indent:function(e,t){e.indentLine(e.getCursor().line,t.indentRight)},exitInsertMode:Ue},At={"(":"bracket",")":"bracket","{":"bracket","}":"bracket","[":"section","]":"section","*":"comment","/":"comment",m:"method",M:"method","#":"preprocess"},Mt={bracket:{isComplete:function(e){if(e.nextCh===e.symb){if(e.depth++,e.depth>=1)return!0}else e.nextCh===e.reverseSymb&&e.depth--;return!1}},section:{init:function(e){e.curMoveThrough=!0,e.symb=(e.forward?"]":"[")===e.symb?"{":"}"},isComplete:function(e){return 0===e.index&&e.nextCh===e.symb}},comment:{isComplete:function(e){var t="*"===e.lastCh&&"/"===e.nextCh;return e.lastCh=e.nextCh,t}},method:{init:function(e){e.symb="m"===e.symb?"{":"}",e.reverseSymb="{"===e.symb?"}":"{"},isComplete:function(e){return e.nextCh===e.symb}},preprocess:{init:function(e){e.index=0},isComplete:function(e){if("#"===e.nextCh){var t=e.lineText.match(/#(\w+)/)[1];if("endif"===t){if(e.forward&&0===e.depth)return!0;e.depth++}else if("if"===t){if(!e.forward&&0===e.depth)return!0;e.depth--}if("else"===t&&0===e.depth)return!0}return!1}}};x("pcre",!0,"boolean"),Se.prototype={getQuery:function(){return bt.query},setQuery:function(e){bt.query=e},getOverlay:function(){return this.searchOverlay},setOverlay:function(e){this.searchOverlay=e},isReversed:function(){return bt.isReversed},setReversed:function(e){bt.isReversed=e},getScrollbarAnnotate:function(){return this.annotate},setScrollbarAnnotate:function(e){this.annotate=e}};var Lt={"\\n":"\n","\\r":"\r","\\t":"\t"},Ft={"\\/":"/","\\\\":"\\","\\n":"\n","\\r":"\r","\\t":"\t"},Ot="(Javascript regexp)",Et=function(){this.buildCommandMap_()};Et.prototype={processCommand:function(e,t,n){var r=this;e.operation(function(){e.curOp.isVimOp=!0,r._processCommand(e,t,n)})},_processCommand:function(t,n,r){var i=t.state.vim,o=bt.registerController.getRegister(":"),a=o.toString();i.visualMode&&le(t);var s=new e.StringStream(n);o.setText(n);var l=r||{};l.input=n;try{this.parseInput_(t,s,l)}catch(e){throw Ne(t,e),e}var c,u;if(l.commandName){if(c=this.matchCommand_(l.commandName)){if(u=c.name,c.excludeFromCommandHistory&&o.setText(a),this.parseCommandArgs_(s,l,c),"exToKey"==c.type){for(var f=0;f<c.toKeys.length;f++)e.Vim.handleKey(t,c.toKeys[f],"mapping");return}if("exToEx"==c.type)return void this.processCommand(t,c.toInput)}}else void 0!==l.line&&(u="move");if(!u)return void Ne(t,'Not an editor command ":'+n+'"');try{Dt[u](t,l),c&&c.possiblyAsync||!l.callback||l.callback()}catch(e){throw Ne(t,e),e}},parseInput_:function(e,t,n){t.eatWhile(":"),t.eat("%")?(n.line=e.firstLine(),n.lineEnd=e.lastLine()):(n.line=this.parseLineSpec_(e,t),void 0!==n.line&&t.eat(",")&&(n.lineEnd=this.parseLineSpec_(e,t)));var r=t.match(/^(\w+)/);return r?n.commandName=r[1]:n.commandName=t.match(/.*/)[0],n},parseLineSpec_:function(e,t){var n=t.match(/^(\d+)/);if(n)return parseInt(n[1],10)-1;switch(t.next()){case".":return e.getCursor().line;case"$":return e.lastLine();case"'":var r=e.state.vim.marks[t.next()];if(r&&r.find())return r.find().line;throw new Error("Mark not set");default:return void t.backUp(1)}},parseCommandArgs_:function(e,t,n){if(!e.eol()){t.argString=e.match(/.*/)[0];var r=n.argDelimiter||/\s+/,i=Y(t.argString).split(r);i.length&&i[0]&&(t.args=i)}},matchCommand_:function(e){for(var t=e.length;t>0;t--){var n=e.substring(0,t);if(this.commandMap_[n]){var r=this.commandMap_[n];if(0===r.name.indexOf(e))return r}}return null},buildCommandMap_:function(){this.commandMap_={};for(var e=0;e<n.length;e++){var t=n[e],r=t.shortName||t.name;this.commandMap_[r]=t}},map:function(e,n,r){if(":"!=e&&":"==e.charAt(0)){if(r)throw Error("Mode not supported for ex mappings");var i=e.substring(1);":"!=n&&":"==n.charAt(0)?this.commandMap_[i]={name:i,type:"exToEx",toInput:n.substring(1),user:!0}:this.commandMap_[i]={name:i,type:"exToKey",toKeys:n,user:!0}}else if(":"!=n&&":"==n.charAt(0)){var o={keys:e,type:"keyToEx",exArgs:{input:n.substring(1)},user:!0};r&&(o.context=r),t.unshift(o)}else{var o={keys:e,type:"keyToKey",toKeys:n,user:!0};r&&(o.context=r),t.unshift(o)}},unmap:function(e,n){if(":"!=e&&":"==e.charAt(0)){if(n)throw Error("Mode not supported for ex mappings");var r=e.substring(1);if(this.commandMap_[r]&&this.commandMap_[r].user)return void delete this.commandMap_[r]}else for(var i=e,o=0;o<t.length;o++)if(i==t[o].keys&&t[o].context===n&&t[o].user)return void t.splice(o,1);throw Error("No such mapping.")}};var Dt={colorscheme:function(e,t){return!t.args||t.args.length<1?void Ne(e,e.getOption("theme")):void e.setOption("theme",t.args[0])},map:function(e,t,n){var r=t.args;return!r||r.length<2?void(e&&Ne(e,"Invalid mapping: "+t.input)):void Nt.map(r[0],r[1],n)},imap:function(e,t){this.map(e,t,"insert")},nmap:function(e,t){this.map(e,t,"normal")},vmap:function(e,t){this.map(e,t,"visual")},unmap:function(e,t,n){var r=t.args;return!r||r.length<1?void(e&&Ne(e,"No such mapping: "+t.input)):void Nt.unmap(r[0],n)},move:function(e,t){_t.processCommand(e,e.state.vim,{type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0},repeatOverride:t.line+1})},set:function(e,t){var n=t.args,r=t.setCfg||{};if(!n||n.length<1)return void(e&&Ne(e,"Invalid mapping: "+t.input));var i=n[0].split("="),o=i[0],a=i[1],s=!1;if("?"==o.charAt(o.length-1)){if(a)throw Error("Trailing characters: "+t.argString);o=o.substring(0,o.length-1),s=!0}void 0===a&&"no"==o.substring(0,2)&&(o=o.substring(2),a=!1);var l=vt[o]&&"boolean"==vt[o].type;if(l&&void 0==a&&(a=!0),!l&&void 0===a||s){var c=w(o,e,r);c===!0||c===!1?Ne(e," "+(c?"":"no")+o):Ne(e,"  "+o+"="+c)}else b(o,a,e,r)},setlocal:function(e,t){t.setCfg={scope:"local"},this.set(e,t)},setglobal:function(e,t){t.setCfg={scope:"global"},this.set(e,t)},registers:function(e,t){var n=t.args,r=bt.registerController.registers,i="----------Registers----------<br><br>";if(n){var o;n=n.join("");for(var a=0;a<n.length;a++)if(o=n.charAt(a),bt.registerController.isValidRegister(o)){var s=r[o]||new A;i+='"'+o+"    "+s.toString()+"<br>"}}else for(var o in r){var l=r[o].toString();l.length&&(i+='"'+o+"    "+l+"<br>")}Ne(e,i)},sort:function(t,n){function i(){if(n.argString){var t=new e.StringStream(n.argString);if(t.eat("!")&&(a=!0),t.eol())return;if(!t.eatSpace())return"Invalid arguments";var r=t.match(/[a-z]+/);if(r){r=r[0],s=r.indexOf("i")!=-1,l=r.indexOf("u")!=-1;var i=r.indexOf("d")!=-1&&1,o=r.indexOf("x")!=-1&&1,u=r.indexOf("o")!=-1&&1;if(i+o+u>1)return"Invalid arguments";c=i&&"decimal"||o&&"hex"||u&&"octal"}if(t.match(/\/.*\//))return"patterns not supported"}}function o(e,t){if(a){var n;n=e,e=t,t=n}s&&(e=e.toLowerCase(),t=t.toLowerCase());var r=c&&g.exec(e),i=c&&g.exec(t);return r?(r=parseInt((r[1]+r[2]).toLowerCase(),v),i=parseInt((i[1]+i[2]).toLowerCase(),v),r-i):e<t?-1:1}var a,s,l,c,u=i();if(u)return void Ne(t,u+": "+n.argString);var f=n.line||t.firstLine(),p=n.lineEnd||n.line||t.lastLine();if(f!=p){var d=r(f,0),h=r(p,X(t,p)),m=t.getRange(d,h).split("\n"),g="decimal"==c?/(-?)([\d]+)/:"hex"==c?/(-?)(?:0x)?([0-9a-f]+)/i:"octal"==c?/([0-7]+)/:null,v="decimal"==c?10:"hex"==c?16:"octal"==c?8:null,y=[],x=[];if(c)for(var b=0;b<m.length;b++)g.exec(m[b])?y.push(m[b]):x.push(m[b]);else x=m;if(y.sort(o),x.sort(o),m=a?y.concat(x):x.concat(y),l){var w,k=m;m=[];for(var b=0;b<k.length;b++)k[b]!=w&&m.push(k[b]),w=k[b]}t.replaceRange(m.join("\n"),d,h)}},global:function(e,t){var n=t.argString;if(!n)return void Ne(e,"Regular Expression missing from global");var r,i=void 0!==t.line?t.line:e.firstLine(),o=t.lineEnd||t.line||e.lastLine(),a=Me(n),s=n;if(a.length&&(s=a[0],r=a.slice(1,a.length).join("/")),s)try{Re(e,s,!0,!0)}catch(t){return void Ne(e,"Invalid regex: "+s)}for(var l=Te(e).getQuery(),c=[],u="",f=i;f<=o;f++){var p=l.test(e.getLine(f));p&&(c.push(f+1),u+=e.getLine(f)+"<br>")}if(!r)return void Ne(e,u);var d=0,h=function(){if(d<c.length){var t=c[d]+r;Nt.processCommand(e,t,{callback:h})}d++};h()},substitute:function(e,t){if(!e.getSearchCursor)throw new Error("Search feature not available. Requires searchcursor.js or any other getSearchCursor implementation.");var n,i,o,a,s=t.argString,l=s?Me(s):[],c="",u=!1,f=!1;if(l.length)n=l[0],c=l[1],void 0!==c&&(c=w("pcre")?Ee(c):Oe(c),bt.lastSubstituteReplacePart=c),i=l[2]?l[2].split(" "):[];else if(s&&s.length)return void Ne(e,"Substitutions should be of the form :s/pattern/replace/");if(i&&(o=i[0],a=parseInt(i[1]),o&&(o.indexOf("c")!=-1&&(u=!0,o.replace("c","")),o.indexOf("g")!=-1&&(f=!0,o.replace("g","")),n=n+"/"+o)),n)try{Re(e,n,!0,!0)}catch(t){return void Ne(e,"Invalid regex: "+n)}if(c=c||bt.lastSubstituteReplacePart,void 0===c)return void Ne(e,"No previous substitute regular expression");var p=Te(e),d=p.getQuery(),h=void 0!==t.line?t.line:e.getCursor().line,m=t.lineEnd||h;h==e.firstLine()&&m==e.lastLine()&&(m=1/0),a&&(h=m,m=h+a-1);var g=j(e,r(h,0)),v=e.getSearchCursor(d,g);Ke(e,u,f,h,m,v,d,c,t.callback)},redo:e.commands.redo,undo:e.commands.undo,write:function(t){e.commands.save?e.commands.save(t):t.save&&t.save()},nohlsearch:function(e){He(e)},yank:function(e){var t=W(e.getCursor()),n=t.line,r=e.getLine(n);bt.registerController.pushText("0","yank",r,!0,!0)},delmarks:function(t,n){if(!n.argString||!Y(n.argString))return void Ne(t,"Argument required");for(var r=t.state.vim,i=new e.StringStream(Y(n.argString));!i.eol();){i.eatSpace();var o=i.pos;if(!i.match(/[a-zA-Z]/,!1))return void Ne(t,"Invalid argument: "+n.argString.substring(o));var a=i.next();if(i.match("-",!0)){if(!i.match(/[a-zA-Z]/,!1))return void Ne(t,"Invalid argument: "+n.argString.substring(o));var s=a,l=i.next();if(!(d(s)&&d(l)||g(s)&&g(l)))return void Ne(t,"Invalid argument: "+s+"-");var c=s.charCodeAt(0),u=l.charCodeAt(0);if(c>=u)return void Ne(t,"Invalid argument: "+n.argString.substring(o));for(var f=0;f<=u-c;f++){var p=String.fromCharCode(c+f);delete r.marks[p]}}else delete r.marks[a]}}},Nt=new Et;return e.keyMap.vim={attach:s,detach:a,call:l},x("insertModeEscKeysTimeout",200,"number"),e.keyMap["vim-insert"]={fallthrough:["default"],attach:s,detach:a,call:l},e.keyMap["vim-replace"]={Backspace:"goCharLeft",fallthrough:["vim-insert"],attach:s,detach:a,call:l},C(),kt};e.Vim=i()})},function(e,t,n){!function(e){e(n(3))}(function(e){"use strict";e.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["pgp"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",
0 ignored issues
show
Bug introduced by
The variable e seems to be never initialized.
Loading history...
Bug introduced by
The variable o seems to not be initialized for all possible execution paths.
Loading history...
Bug introduced by
The variable n does not seem to be initialized in case c && this.recordLastEdit..., l.repeat = o, T(e), s on line 12 is false. Are you sure the function c handles undefined variables?
Loading history...
Coding Style Comprehensibility Best Practice introduced by
Empty catch clauses should be used with caution; consider adding a comment why this is needed.
Loading history...
Bug introduced by
The variable w seems to not be initialized for all possible execution paths.
Loading history...
Complexity Best Practice introduced by
There is no return statement if i is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Unused Code introduced by
The assignment to o seems to be never used. If you intend to free memory here, this is not necessary since the variable leaves the scope anyway.
Loading history...
Comprehensibility Naming Best Practice introduced by
The variable s already seems to be declared on line 12. Consider using another variable name or omitting the var keyword.

This check looks for variables that are declared in multiple lines. There may be several reasons for this.

In the simplest case the variable name was reused by mistake. This may lead to very hard to locate bugs.

If you want to reuse a variable for another purpose, consider declaring it at or near the top of your function and just assigning to it subsequently so it is always declared.

Loading history...
Coding Style introduced by
As per coding-style, switch statements should have a default case.
Loading history...
Coding Style Best Practice introduced by
By convention, constructors like r should be capitalized.
Loading history...
Complexity introduced by
A for in loop automatically includes the property of any prototype object, consider checking the key using hasOwnProperty.

When iterating over the keys of an object, this includes not only the keys of the object, but also keys contained in the prototype of that object. It is generally a best practice to check for these keys specifically:

var someObject;
for (var key in someObject) {
    if ( ! someObject.hasOwnProperty(key)) {
        continue; // Skip keys from the prototype.
    }

    doSomethingWith(key);
}
Loading history...
Comprehensibility Naming Best Practice introduced by
The variable g already seems to be declared on line 12. Consider using another variable name or omitting the var keyword.

This check looks for variables that are declared in multiple lines. There may be several reasons for this.

In the simplest case the variable name was reused by mistake. This may lead to very hard to locate bugs.

If you want to reuse a variable for another purpose, consider declaring it at or near the top of your function and just assigning to it subsequently so it is always declared.

Loading history...
Comprehensibility Naming Best Practice introduced by
The variable a already seems to be declared on line 12. Consider using another variable name or omitting the var keyword.

This check looks for variables that are declared in multiple lines. There may be several reasons for this.

In the simplest case the variable name was reused by mistake. This may lead to very hard to locate bugs.

If you want to reuse a variable for another purpose, consider declaring it at or near the top of your function and just assigning to it subsequently so it is always declared.

Loading history...
Complexity Best Practice introduced by
There is no return statement if f != p is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Complexity Best Practice introduced by
There is no return statement if n.argString is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
introduced by
The for loop does not have a body. Maybe you have misplaced a semicolon. If you do wish to have a loop without a body, use an empty body {}.
Loading history...
Comprehensibility Naming Best Practice introduced by
The variable o already seems to be declared on line 12. Consider using another variable name or omitting the var keyword.

This check looks for variables that are declared in multiple lines. There may be several reasons for this.

In the simplest case the variable name was reused by mistake. This may lead to very hard to locate bugs.

If you want to reuse a variable for another purpose, consider declaring it at or near the top of your function and just assigning to it subsequently so it is always declared.

Loading history...
Comprehensibility Naming Best Practice introduced by
The variable b already seems to be declared on line 12. Consider using another variable name or omitting the var keyword.

This check looks for variables that are declared in multiple lines. There may be several reasons for this.

In the simplest case the variable name was reused by mistake. This may lead to very hard to locate bugs.

If you want to reuse a variable for another purpose, consider declaring it at or near the top of your function and just assigning to it subsequently so it is always declared.

Loading history...
Coding Style Best Practice introduced by
Curly braces around statements make for more readable code and help prevent bugs when you add further statements.

Consider adding curly braces around all statements when they are executed conditionally. This is optional if there is only one statement, but leaving them out can lead to unexpected behaviour if another statement is added later.

Consider:

if (a > 0)
    b = 42;

If you or someone else later decides to put another statement in, only the first statement will be executed.

if (a > 0)
    console.log("a > 0");
    b = 42;

In this case the statement b = 42 will always be executed, while the logging statement will be executed conditionally.

if (a > 0) {
    console.log("a > 0");
    b = 42;
}

ensures that the proper code will be executed conditionally no matter how many statements are added or removed.

Loading history...
Bug introduced by
The variable i seems to not be initialized for all possible execution paths. Are you sure r handles undefined variables?
Loading history...
Comprehensibility introduced by
Usage of the sequence operator is discouraged, since it may lead to obfuscated code.

The sequence or comma operator allows the inclusion of multiple expressions where only is permitted. The result of the sequence is the value of the last expression.

This operator is most often used in for statements.

Used in another places it can make code hard to read, especially when people do not realize it even exists as a seperate operator.

This check looks for usage of the sequence operator in locations where it is not necessary and could be replaced by a series of expressions or statements.

var a,b,c;

a = 1, b = 1,  c= 3;

could just as well be written as:

var a,b,c;

a = 1;
b = 1;
c = 3;

To learn more about the sequence operator, please refer to the MDN.

Loading history...
Complexity Best Practice introduced by
There is no return statement if t.match(\/.*\/) is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Bug introduced by
The variable n does not seem to be initialized in case s && s.length on line 12 is false. Are you sure this can never be the case?
Loading history...
Comprehensibility Naming Best Practice introduced by
The variable h already seems to be declared on line 12. Consider using another variable name or omitting the var keyword.

This check looks for variables that are declared in multiple lines. There may be several reasons for this.

In the simplest case the variable name was reused by mistake. This may lead to very hard to locate bugs.

If you want to reuse a variable for another purpose, consider declaring it at or near the top of your function and just assigning to it subsequently so it is always declared.

Loading history...
Coding Style introduced by
Consider using undefined instead of void(0). It is equivalent and more straightforward to read.
Loading history...
Best Practice introduced by
There is no return statement in this branch, but you do return something in other branches. Did you maybe miss it? If you do not want to return anything, consider adding return undefined; explicitly.
Loading history...
13
mime:"text/x-csrc",mode:"clike",ext:["c","h"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists.txt$/},{name:"CoffeeScript",mime:"text/x-coffeescript",mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded Javascript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history).md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"null",mode:"jinja2"},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mime:"text/n-triples",mode:"ntriples",ext:["nt"]},{name:"Objective C",mime:"text/x-objectivec",mode:"clike",ext:["m","mm"],alias:["objective-c","objc"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mime:"application/x-httpd-php",mode:"php",ext:["php","php3","php4","php5","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mime:"text/x-sh",mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki ",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]}];for(var t=0;t<e.modeInfo.length;t++){var n=e.modeInfo[t];n.mimes&&(n.mime=n.mimes[0])}e.findModeByMIME=function(t){t=t.toLowerCase();for(var n=0;n<e.modeInfo.length;n++){var r=e.modeInfo[n];if(r.mime==t)return r;if(r.mimes)for(var i=0;i<r.mimes.length;i++)if(r.mimes[i]==t)return r}return/\+xml$/.test(t)?e.findModeByMIME("application/xml"):/\+json$/.test(t)?e.findModeByMIME("application/json"):void 0},e.findModeByExtension=function(t){for(var n=0;n<e.modeInfo.length;n++){var r=e.modeInfo[n];if(r.ext)for(var i=0;i<r.ext.length;i++)if(r.ext[i]==t)return r}},e.findModeByFileName=function(t){for(var n=0;n<e.modeInfo.length;n++){var r=e.modeInfo[n];if(r.file&&r.file.test(t))return r}var i=t.lastIndexOf("."),o=i>-1&&t.substring(i+1,t.length);if(o)return e.findModeByExtension(o)},e.findModeByName=function(t){t=t.toLowerCase();for(var n=0;n<e.modeInfo.length;n++){var r=e.modeInfo[n];if(r.name.toLowerCase()==t)return r;if(r.alias)for(var i=0;i<r.alias.length;i++)if(r.alias[i].toLowerCase()==t)return r}}})},function(e,t,n){!function(e){e(n(3),n(41),n(39))}(function(e){"use strict";function t(e){for(var t={},n=e.split(" "),r=0;r<n.length;++r)t[n[r]]=!0;return t}function n(e,t,i){return 0==e.length?r(t):function(o,a){for(var s=e[0],l=0;l<s.length;l++)if(o.match(s[l][0]))return a.tokenize=n(e.slice(1),t),s[l][1];return a.tokenize=r(t,i),"string"}}function r(e,t){return function(n,r){return i(n,r,e,t)}}function i(e,t,r,i){if(i!==!1&&e.match("${",!1)||e.match("{$",!1))return t.tokenize=null,"string";if(i!==!1&&e.match(/^\$[a-zA-Z_][a-zA-Z0-9_]*/))return e.match("[",!1)&&(t.tokenize=n([[["[",null]],[[/\d[\w\.]*/,"number"],[/\$[a-zA-Z_][a-zA-Z0-9_]*/,"variable-2"],[/[\w\$]+/,"variable"]],[["]",null]]],r,i)),e.match(/\-\>\w/,!1)&&(t.tokenize=n([[["->",null]],[[/[\w]+/,"variable"]]],r,i)),"variable-2";for(var o=!1;!e.eol()&&(o||i===!1||!e.match("{$",!1)&&!e.match(/^(\$[a-zA-Z_][a-zA-Z0-9_]*|\$\{)/,!1));){if(!o&&e.match(r)){t.tokenize=null,t.tokStack.pop(),t.tokStack.pop();break}o="\\"==e.next()&&!o}return"string"}var o="abstract and array as break case catch class clone const continue declare default do else elseif enddeclare endfor endforeach endif endswitch endwhile extends final for foreach function global goto if implements interface instanceof namespace new or private protected public static switch throw trait try use var while xor die echo empty exit eval include include_once isset list require require_once return print unset __halt_compiler self static parent yield insteadof finally",a="true false null TRUE FALSE NULL __CLASS__ __DIR__ __FILE__ __LINE__ __METHOD__ __FUNCTION__ __NAMESPACE__ __TRAIT__",s="func_num_args func_get_arg func_get_args strlen strcmp strncmp strcasecmp strncasecmp each error_reporting define defined trigger_error user_error set_error_handler restore_error_handler get_declared_classes get_loaded_extensions extension_loaded get_extension_funcs debug_backtrace constant bin2hex hex2bin sleep usleep time mktime gmmktime strftime gmstrftime strtotime date gmdate getdate localtime checkdate flush wordwrap htmlspecialchars htmlentities html_entity_decode md5 md5_file crc32 getimagesize image_type_to_mime_type phpinfo phpversion phpcredits strnatcmp strnatcasecmp substr_count strspn strcspn strtok strtoupper strtolower strpos strrpos strrev hebrev hebrevc nl2br basename dirname pathinfo stripslashes stripcslashes strstr stristr strrchr str_shuffle str_word_count strcoll substr substr_replace quotemeta ucfirst ucwords strtr addslashes addcslashes rtrim str_replace str_repeat count_chars chunk_split trim ltrim strip_tags similar_text explode implode setlocale localeconv parse_str str_pad chop strchr sprintf printf vprintf vsprintf sscanf fscanf parse_url urlencode urldecode rawurlencode rawurldecode readlink linkinfo link unlink exec system escapeshellcmd escapeshellarg passthru shell_exec proc_open proc_close rand srand getrandmax mt_rand mt_srand mt_getrandmax base64_decode base64_encode abs ceil floor round is_finite is_nan is_infinite bindec hexdec octdec decbin decoct dechex base_convert number_format fmod ip2long long2ip getenv putenv getopt microtime gettimeofday getrusage uniqid quoted_printable_decode set_time_limit get_cfg_var magic_quotes_runtime set_magic_quotes_runtime get_magic_quotes_gpc get_magic_quotes_runtime import_request_variables error_log serialize unserialize memory_get_usage var_dump var_export debug_zval_dump print_r highlight_file show_source highlight_string ini_get ini_get_all ini_set ini_alter ini_restore get_include_path set_include_path restore_include_path setcookie header headers_sent connection_aborted connection_status ignore_user_abort parse_ini_file is_uploaded_file move_uploaded_file intval floatval doubleval strval gettype settype is_null is_resource is_bool is_long is_float is_int is_integer is_double is_real is_numeric is_string is_array is_object is_scalar ereg ereg_replace eregi eregi_replace split spliti join sql_regcase dl pclose popen readfile rewind rmdir umask fclose feof fgetc fgets fgetss fread fopen fpassthru ftruncate fstat fseek ftell fflush fwrite fputs mkdir rename copy tempnam tmpfile file file_get_contents file_put_contents stream_select stream_context_create stream_context_set_params stream_context_set_option stream_context_get_options stream_filter_prepend stream_filter_append fgetcsv flock get_meta_tags stream_set_write_buffer set_file_buffer set_socket_blocking stream_set_blocking socket_set_blocking stream_get_meta_data stream_register_wrapper stream_wrapper_register stream_set_timeout socket_set_timeout socket_get_status realpath fnmatch fsockopen pfsockopen pack unpack get_browser crypt opendir closedir chdir getcwd rewinddir readdir dir glob fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype file_exists is_writable is_writeable is_readable is_executable is_file is_dir is_link stat lstat chown touch clearstatcache mail ob_start ob_flush ob_clean ob_end_flush ob_end_clean ob_get_flush ob_get_clean ob_get_length ob_get_level ob_get_status ob_get_contents ob_implicit_flush ob_list_handlers ksort krsort natsort natcasesort asort arsort sort rsort usort uasort uksort shuffle array_walk count end prev next reset current key min max in_array array_search extract compact array_fill range array_multisort array_push array_pop array_shift array_unshift array_splice array_slice array_merge array_merge_recursive array_keys array_values array_count_values array_reverse array_reduce array_pad array_flip array_change_key_case array_rand array_unique array_intersect array_intersect_assoc array_diff array_diff_assoc array_sum array_filter array_map array_chunk array_key_exists array_intersect_key array_combine array_column pos sizeof key_exists assert assert_options version_compare ftok str_rot13 aggregate session_name session_module_name session_save_path session_id session_regenerate_id session_decode session_register session_unregister session_is_registered session_encode session_start session_destroy session_unset session_set_save_handler session_cache_limiter session_cache_expire session_set_cookie_params session_get_cookie_params session_write_close preg_match preg_match_all preg_replace preg_replace_callback preg_split preg_quote preg_grep overload ctype_alnum ctype_alpha ctype_cntrl ctype_digit ctype_lower ctype_graph ctype_print ctype_punct ctype_space ctype_upper ctype_xdigit virtual apache_request_headers apache_note apache_lookup_uri apache_child_terminate apache_setenv apache_response_headers apache_get_version getallheaders mysql_connect mysql_pconnect mysql_close mysql_select_db mysql_create_db mysql_drop_db mysql_query mysql_unbuffered_query mysql_db_query mysql_list_dbs mysql_list_tables mysql_list_fields mysql_list_processes mysql_error mysql_errno mysql_affected_rows mysql_insert_id mysql_result mysql_num_rows mysql_num_fields mysql_fetch_row mysql_fetch_array mysql_fetch_assoc mysql_fetch_object mysql_data_seek mysql_fetch_lengths mysql_fetch_field mysql_field_seek mysql_free_result mysql_field_name mysql_field_table mysql_field_len mysql_field_type mysql_field_flags mysql_escape_string mysql_real_escape_string mysql_stat mysql_thread_id mysql_client_encoding mysql_get_client_info mysql_get_host_info mysql_get_proto_info mysql_get_server_info mysql_info mysql mysql_fieldname mysql_fieldtable mysql_fieldlen mysql_fieldtype mysql_fieldflags mysql_selectdb mysql_createdb mysql_dropdb mysql_freeresult mysql_numfields mysql_numrows mysql_listdbs mysql_listtables mysql_listfields mysql_db_name mysql_dbname mysql_tablename mysql_table_name pg_connect pg_pconnect pg_close pg_connection_status pg_connection_busy pg_connection_reset pg_host pg_dbname pg_port pg_tty pg_options pg_ping pg_query pg_send_query pg_cancel_query pg_fetch_result pg_fetch_row pg_fetch_assoc pg_fetch_array pg_fetch_object pg_fetch_all pg_affected_rows pg_get_result pg_result_seek pg_result_status pg_free_result pg_last_oid pg_num_rows pg_num_fields pg_field_name pg_field_num pg_field_size pg_field_type pg_field_prtlen pg_field_is_null pg_get_notify pg_get_pid pg_result_error pg_last_error pg_last_notice pg_put_line pg_end_copy pg_copy_to pg_copy_from pg_trace pg_untrace pg_lo_create pg_lo_unlink pg_lo_open pg_lo_close pg_lo_read pg_lo_write pg_lo_read_all pg_lo_import pg_lo_export pg_lo_seek pg_lo_tell pg_escape_string pg_escape_bytea pg_unescape_bytea pg_client_encoding pg_set_client_encoding pg_meta_data pg_convert pg_insert pg_update pg_delete pg_select pg_exec pg_getlastoid pg_cmdtuples pg_errormessage pg_numrows pg_numfields pg_fieldname pg_fieldsize pg_fieldtype pg_fieldnum pg_fieldprtlen pg_fieldisnull pg_freeresult pg_result pg_loreadall pg_locreate pg_lounlink pg_loopen pg_loclose pg_loread pg_lowrite pg_loimport pg_loexport http_response_code get_declared_traits getimagesizefromstring socket_import_stream stream_set_chunk_size trait_exists header_register_callback class_uses session_status session_register_shutdown echo print global static exit array empty eval isset unset die include require include_once require_once json_decode json_encode json_last_error json_last_error_msg curl_close curl_copy_handle curl_errno curl_error curl_escape curl_exec curl_file_create curl_getinfo curl_init curl_multi_add_handle curl_multi_close curl_multi_exec curl_multi_getcontent curl_multi_info_read curl_multi_init curl_multi_remove_handle curl_multi_select curl_multi_setopt curl_multi_strerror curl_pause curl_reset curl_setopt_array curl_setopt curl_share_close curl_share_init curl_share_setopt curl_strerror curl_unescape curl_version mysqli_affected_rows mysqli_autocommit mysqli_change_user mysqli_character_set_name mysqli_close mysqli_commit mysqli_connect_errno mysqli_connect_error mysqli_connect mysqli_data_seek mysqli_debug mysqli_dump_debug_info mysqli_errno mysqli_error_list mysqli_error mysqli_fetch_all mysqli_fetch_array mysqli_fetch_assoc mysqli_fetch_field_direct mysqli_fetch_field mysqli_fetch_fields mysqli_fetch_lengths mysqli_fetch_object mysqli_fetch_row mysqli_field_count mysqli_field_seek mysqli_field_tell mysqli_free_result mysqli_get_charset mysqli_get_client_info mysqli_get_client_stats mysqli_get_client_version mysqli_get_connection_stats mysqli_get_host_info mysqli_get_proto_info mysqli_get_server_info mysqli_get_server_version mysqli_info mysqli_init mysqli_insert_id mysqli_kill mysqli_more_results mysqli_multi_query mysqli_next_result mysqli_num_fields mysqli_num_rows mysqli_options mysqli_ping mysqli_prepare mysqli_query mysqli_real_connect mysqli_real_escape_string mysqli_real_query mysqli_reap_async_query mysqli_refresh mysqli_rollback mysqli_select_db mysqli_set_charset mysqli_set_local_infile_default mysqli_set_local_infile_handler mysqli_sqlstate mysqli_ssl_set mysqli_stat mysqli_stmt_init mysqli_store_result mysqli_thread_id mysqli_thread_safe mysqli_use_result mysqli_warning_count";e.registerHelper("hintWords","php",[o,a,s].join(" ").split(" ")),e.registerHelper("wordChars","php",/[\w$]/);var l={name:"clike",helperType:"php",keywords:t(o),blockKeywords:t("catch do else elseif for foreach if switch try while finally"),defKeywords:t("class function interface namespace trait"),atoms:t(a),builtin:t(s),multiLineStrings:!0,hooks:{$:function(e){return e.eatWhile(/[\w\$_]/),"variable-2"},"<":function(e,t){var n;if(n=e.match(/<<\s*/)){var i=e.eat(/['"]/);e.eatWhile(/[\w\.]/);var o=e.current().slice(n[0].length+(i?2:1));if(i&&e.eat(i),o)return(t.tokStack||(t.tokStack=[])).push(o,0),t.tokenize=r(o,"'"!=i),"string"}return!1},"#":function(e){for(;!e.eol()&&!e.match("?>",!1);)e.next();return"comment"},"/":function(e){if(e.eat("/")){for(;!e.eol()&&!e.match("?>",!1);)e.next();return"comment"}return!1},'"':function(e,t){return(t.tokStack||(t.tokStack=[])).push('"',0),t.tokenize=r('"'),"string"},"{":function(e,t){return t.tokStack&&t.tokStack.length&&t.tokStack[t.tokStack.length-1]++,!1},"}":function(e,t){return t.tokStack&&t.tokStack.length>0&&!--t.tokStack[t.tokStack.length-1]&&(t.tokenize=r(t.tokStack[t.tokStack.length-2])),!1}}};e.defineMode("php",function(t,n){function r(t,n){var r=n.curMode==o;if(t.sol()&&n.pending&&'"'!=n.pending&&"'"!=n.pending&&(n.pending=null),r)return r&&null==n.php.tokenize&&t.match("?>")?(n.curMode=i,n.curState=n.html,n.php.context.prev||(n.php=null),"meta"):o.token(t,n.curState);if(t.match(/^<\?\w*/))return n.curMode=o,n.php||(n.php=e.startState(o,i.indent(n.html,""))),n.curState=n.php,"meta";if('"'==n.pending||"'"==n.pending){for(;!t.eol()&&t.next()!=n.pending;);var a="string"}else if(n.pending&&t.pos<n.pending.end){t.pos=n.pending.end;var a=n.pending.style}else var a=i.token(t,n.curState);n.pending&&(n.pending=null);var s,l=t.current(),c=l.search(/<\?/);return c!=-1&&("string"==a&&(s=l.match(/[\'\"]$/))&&!/\?>/.test(l)?n.pending=s[0]:n.pending={end:t.pos,style:a},t.backUp(l.length-c)),a}var i=e.getMode(t,"text/html"),o=e.getMode(t,l);return{startState:function(){var t=e.startState(i),r=n.startOpen?e.startState(o):null;return{html:t,php:r,curMode:n.startOpen?o:i,curState:n.startOpen?r:t,pending:null}},copyState:function(t){var n,r=t.html,a=e.copyState(i,r),s=t.php,l=s&&e.copyState(o,s);return n=t.curMode==i?a:l,{html:a,php:l,curMode:t.curMode,curState:n,pending:t.pending}},token:r,indent:function(e,t){return e.curMode!=o&&/^\s*<\//.test(t)||e.curMode==o&&/^\?>/.test(t)?i.indent(e.html,t):e.curMode.indent(e.curState,t)},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//",innerMode:function(e){return{state:e.curState,mode:e.curMode}}}},"htmlmixed","clike"),e.defineMIME("application/x-httpd-php","php"),e.defineMIME("application/x-httpd-php-open",{name:"php",startOpen:!0}),e.defineMIME("text/x-php",l)})},function(e,t,n){var r,i,o;/*!
0 ignored issues
show
introduced by
The for loop does not have a body. Maybe you have misplaced a semicolon. If you do wish to have a loop without a body, use an empty body {}.
Loading history...
Coding Style Best Practice introduced by
Curly braces around statements make for more readable code and help prevent bugs when you add further statements.

Consider adding curly braces around all statements when they are executed conditionally. This is optional if there is only one statement, but leaving them out can lead to unexpected behaviour if another statement is added later.

Consider:

if (a > 0)
    b = 42;

If you or someone else later decides to put another statement in, only the first statement will be executed.

if (a > 0)
    console.log("a > 0");
    b = 42;

In this case the statement b = 42 will always be executed, while the logging statement will be executed conditionally.

if (a > 0) {
    console.log("a > 0");
    b = 42;
}

ensures that the proper code will be executed conditionally no matter how many statements are added or removed.

Loading history...
Comprehensibility introduced by
Usage of the sequence operator is discouraged, since it may lead to obfuscated code.

The sequence or comma operator allows the inclusion of multiple expressions where only is permitted. The result of the sequence is the value of the last expression.

This operator is most often used in for statements.

Used in another places it can make code hard to read, especially when people do not realize it even exists as a seperate operator.

This check looks for usage of the sequence operator in locations where it is not necessary and could be replaced by a series of expressions or statements.

var a,b,c;

a = 1, b = 1,  c= 3;

could just as well be written as:

var a,b,c;

a = 1;
b = 1;
c = 3;

To learn more about the sequence operator, please refer to the MDN.

Loading history...
Coding Style introduced by
Consider using undefined instead of void(0). It is equivalent and more straightforward to read.
Loading history...
Complexity Best Practice introduced by
There is no return statement if o is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Bug introduced by
The variable s seems to not be initialized for all possible execution paths.
Loading history...
Comprehensibility Naming Best Practice introduced by
The variable a already seems to be declared on line 13. Consider using another variable name or omitting the var keyword.

This check looks for variables that are declared in multiple lines. There may be several reasons for this.

In the simplest case the variable name was reused by mistake. This may lead to very hard to locate bugs.

If you want to reuse a variable for another purpose, consider declaring it at or near the top of your function and just assigning to it subsequently so it is always declared.

Loading history...
Best Practice introduced by
There is no return statement in this branch, but you do return something in other branches. Did you maybe miss it? If you do not want to return anything, consider adding return undefined; explicitly.
Loading history...
14
 * jQuery Mousewheel 3.1.13
15
 *
16
 * Copyright jQuery Foundation and other contributors
17
 * Released under the MIT license
18
 * http://jquery.org/license
19
 */
20
!function(a){i=[n(6)],r=a,o="function"==typeof r?r.apply(t,i):r,!(void 0!==o&&(e.exports=o))}(function(e){function t(t){var a=t||window.event,s=l.call(arguments,1),c=0,f=0,p=0,d=0,h=0,m=0;if(t=e.event.fix(a),t.type="mousewheel","detail"in a&&(p=a.detail*-1),"wheelDelta"in a&&(p=a.wheelDelta),"wheelDeltaY"in a&&(p=a.wheelDeltaY),"wheelDeltaX"in a&&(f=a.wheelDeltaX*-1),"axis"in a&&a.axis===a.HORIZONTAL_AXIS&&(f=p*-1,p=0),c=0===p?f:p,"deltaY"in a&&(p=a.deltaY*-1,c=p),"deltaX"in a&&(f=a.deltaX,0===p&&(c=f*-1)),0!==p||0!==f){if(1===a.deltaMode){var g=e.data(this,"mousewheel-line-height");c*=g,p*=g,f*=g}else if(2===a.deltaMode){var v=e.data(this,"mousewheel-page-height");c*=v,p*=v,f*=v}if(d=Math.max(Math.abs(p),Math.abs(f)),(!o||d<o)&&(o=d,r(a,d)&&(o/=40)),r(a,d)&&(c/=40,f/=40,p/=40),c=Math[c>=1?"floor":"ceil"](c/o),f=Math[f>=1?"floor":"ceil"](f/o),p=Math[p>=1?"floor":"ceil"](p/o),u.settings.normalizeOffset&&this.getBoundingClientRect){var y=this.getBoundingClientRect();h=t.clientX-y.left,m=t.clientY-y.top}return t.deltaX=f,t.deltaY=p,t.deltaFactor=o,t.offsetX=h,t.offsetY=m,t.deltaMode=0,s.unshift(t,c,f,p),i&&clearTimeout(i),i=setTimeout(n,200),(e.event.dispatch||e.event.handle).apply(this,s)}}function n(){o=null}function r(e,t){return u.settings.adjustOldDeltas&&"mousewheel"===e.type&&t%120===0}var i,o,a=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],s="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],l=Array.prototype.slice;if(e.event.fixHooks)for(var c=a.length;c;)e.event.fixHooks[a[--c]]=e.event.mouseHooks;var u=e.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var n=s.length;n;)this.addEventListener(s[--n],t,!1);else this.onmousewheel=t;e.data(this,"mousewheel-line-height",u.getLineHeight(this)),e.data(this,"mousewheel-page-height",u.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var n=s.length;n;)this.removeEventListener(s[--n],t,!1);else this.onmousewheel=null;e.removeData(this,"mousewheel-line-height"),e.removeData(this,"mousewheel-page-height")},getLineHeight:function(t){var n=e(t),r=n["offsetParent"in e.fn?"offsetParent":"parent"]();return r.length||(r=e("body")),parseInt(r.css("fontSize"),10)||parseInt(n.css("fontSize"),10)||16},getPageHeight:function(t){return e(t).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};e.fn.extend({mousewheel:function(e){return e?this.bind("mousewheel",e):this.trigger("mousewheel")},unmousewheel:function(e){return this.unbind("mousewheel",e)}})})},function(e,t,n){(function(e,t){/**@license
0 ignored issues
show
Complexity Best Practice introduced by
There is no return statement if t = e.event.fix(a), t.ty... -1, 0 !== p || 0 !== f is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Coding Style introduced by
Consider using undefined instead of void(0). It is equivalent and more straightforward to read.
Loading history...
Coding Style Best Practice introduced by
Curly braces around statements make for more readable code and help prevent bugs when you add further statements.

Consider adding curly braces around all statements when they are executed conditionally. This is optional if there is only one statement, but leaving them out can lead to unexpected behaviour if another statement is added later.

Consider:

if (a > 0)
    b = 42;

If you or someone else later decides to put another statement in, only the first statement will be executed.

if (a > 0)
    console.log("a > 0");
    b = 42;

In this case the statement b = 42 will always be executed, while the logging statement will be executed conditionally.

if (a > 0) {
    console.log("a > 0");
    b = 42;
}

ensures that the proper code will be executed conditionally no matter how many statements are added or removed.

Loading history...
Comprehensibility introduced by
Usage of the sequence operator is discouraged, since it may lead to obfuscated code.

The sequence or comma operator allows the inclusion of multiple expressions where only is permitted. The result of the sequence is the value of the last expression.

This operator is most often used in for statements.

Used in another places it can make code hard to read, especially when people do not realize it even exists as a seperate operator.

This check looks for usage of the sequence operator in locations where it is not necessary and could be replaced by a series of expressions or statements.

var a,b,c;

a = 1, b = 1,  c= 3;

could just as well be written as:

var a,b,c;

a = 1;
b = 1;
c = 3;

To learn more about the sequence operator, please refer to the MDN.

Loading history...
21
 *       __ _____                     ________                              __
22
 *      / // _  /__ __ _____ ___ __ _/__  ___/__ ___ ______ __ __  __ ___  / /
23
 *  __ / // // // // // _  // _// // / / // _  // _//     // //  \/ // _ \/ /
24
 * /  / // // // // // ___// / / // / / // ___// / / / / // // /\  // // / /__
25
 * \___//____ \\___//____//_/ _\_  / /_//____//_/ /_/ /_//_//_/ /_/ \__\_\___/
26
 *           \/              /____/                              version 0.11.23
27
 *
28
 * This file is part of jQuery Terminal. http://terminal.jcubic.pl
29
 *
30
 * Copyright (c) 2010-2016 Jakub Jankiewicz <http://jcubic.pl>
31
 * Released under the MIT license
32
 *
33
 * Contains:
34
 *
35
 * Storage plugin Distributed under the MIT License
36
 * Copyright (c) 2010 Dave Schindler
37
 *
38
 * jQuery Timers licenced with the WTFPL
39
 * <http://jquery.offput.ca/timers/>
40
 *
41
 * Cross-Browser Split 1.1.1
42
 * Copyright 2007-2012 Steven Levithan <stevenlevithan.com>
43
 * Available under the MIT License
44
 *
45
 * jQuery Caret
46
 * Copyright (c) 2009, Gideon Sireling
47
 * 3 clause BSD License
48
 *
49
 * sprintf.js
50
 * Copyright (c) 2007-2013 Alexandru Marasteanu <hello at alexei dot ro>
51
 * licensed under 3 clause BSD license
52
 *
53
 * Date: Sat, 10 Dec 2016 10:56:53 +0000
54
 */
55
!function(e){function t(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()}function n(e,t){for(var n=[];t>0;n[--t]=e);return n.join("")}var r=function(){return r.cache.hasOwnProperty(arguments[0])||(r.cache[arguments[0]]=r.parse(arguments[0])),r.format.call(null,r.cache[arguments[0]],arguments)};r.format=function(e,i){var o,a,s,l,c,u,f,p=1,d=e.length,h="",m=[];for(a=0;a<d;a++)if(h=t(e[a]),"string"===h)m.push(e[a]);else if("array"===h){if(l=e[a],l[2])for(o=i[p],s=0;s<l[2].length;s++){if(!o.hasOwnProperty(l[2][s]))throw r('[sprintf] property "%s" does not exist',l[2][s]);o=o[l[2][s]]}else o=l[1]?i[l[1]]:i[p++];if(/[^s]/.test(l[8])&&"number"!=t(o))throw r("[sprintf] expecting number but found %s",t(o));switch(l[8]){case"b":o=o.toString(2);break;case"c":o=String.fromCharCode(o);break;case"d":o=parseInt(o,10);break;case"e":o=l[7]?o.toExponential(l[7]):o.toExponential();break;case"f":o=l[7]?parseFloat(o).toFixed(l[7]):parseFloat(o);break;case"o":o=o.toString(8);break;case"s":o=(o=String(o))&&l[7]?o.substring(0,l[7]):o;break;case"u":o>>>=0;break;case"x":o=o.toString(16);break;case"X":o=o.toString(16).toUpperCase()}o=/[def]/.test(l[8])&&l[3]&&o>=0?"+"+o:o,u=l[4]?"0"==l[4]?"0":l[4].charAt(1):" ",f=l[6]-String(o).length,c=l[6]?n(u,f):"",m.push(l[5]?o+c:c+o)}return m.join("")},r.cache={},r.parse=function(e){for(var t=e,n=[],r=[],i=0;t;){if(null!==(n=/^[^\x25]+/.exec(t)))r.push(n[0]);else if(null!==(n=/^\x25{2}/.exec(t)))r.push("%");else{if(null===(n=/^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(t)))throw"[sprintf] huh?";if(n[2]){i|=1;var o=[],a=n[2],s=[];if(null===(s=/^([a-z_][a-z_\d]*)/i.exec(a)))throw"[sprintf] huh?";for(o.push(s[1]);""!==(a=a.substring(s[0].length));)if(null!==(s=/^\.([a-z_][a-z_\d]*)/i.exec(a)))o.push(s[1]);else{if(null===(s=/^\[(\d+)\]/.exec(a)))throw"[sprintf] huh?";o.push(s[1])}n[2]=o}else i|=2;if(3===i)throw"[sprintf] mixing positional and named placeholders is not (yet) supported";r.push(n)}t=t.substring(n[0].length)}return r};var i=function(e,t,n){return n=t.slice(0),n.splice(0,0,e),r.apply(null,n)};e.sprintf=r,e.vsprintf=i}("undefined"!=typeof e?e:window),function(e,t){"use strict";function n(e,t){var n;if("string"==typeof e&&"string"==typeof t)return localStorage[e]=t,!0;if("object"==typeof e&&"undefined"==typeof t){for(n in e)e.hasOwnProperty(n)&&(localStorage[n]=e[n]);return!0}return!1}function r(e,t){var n,r,i;if(n=new Date,n.setTime(n.getTime()+31536e6),r="; expires="+n.toGMTString(),"string"==typeof e&&"string"==typeof t)return document.cookie=e+"="+t+r+"; path=/",!0;if("object"==typeof e&&"undefined"==typeof t){for(i in e)e.hasOwnProperty(i)&&(document.cookie=i+"="+e[i]+r+"; path=/");return!0}return!1}function i(e){return localStorage[e]}function o(e){var t,n,r,i;for(t=e+"=",n=document.cookie.split(";"),r=0;r<n.length;r++){for(i=n[r];" "===i.charAt(0);)i=i.substring(1,i.length);if(0===i.indexOf(t))return i.substring(t.length,i.length)}return null}function a(e){return delete localStorage[e]}function s(e){return r(e,"",-1)}function l(e,t){var n=[],r=e.length;if(r<t)return[e];if(t<0)throw new Error("str_parts: length can't be negative");for(var i=0;i<r;i+=t)n.push(e.substring(i,i+t));return n}function c(t){var n=t?[t]:[],r=0;e.extend(this,{get:function(){return n},rotate:function(){if(n.filter(Boolean).length)return 1===n.length?n[0]:(r===n.length-1?r=0:++r,n[r]?n[r]:this.rotate())},length:function(){return n.length},remove:function(e){delete n[e]},set:function(e){for(var t=n.length;t--;)if(n[t]===e)return void(r=t);this.append(e)},front:function(){if(n.length){for(var e=r,t=!1;!n[e];)if(e++,e>n.length){if(t)break;e=0,t=!0}return n[e]}},append:function(e){n.push(e)}})}function u(t){var n=t instanceof Array?t:t?[t]:[];e.extend(this,{data:function(){return n},map:function(t){return e.map(n,t)},size:function(){return n.length},pop:function(){if(0===n.length)return null;var e=n[n.length-1];return n=n.slice(0,n.length-1),e},push:function(e){return n=n.concat([e]),e},top:function(){return n.length>0?n[n.length-1]:null},clone:function(){return new u(n.slice(0))}})}function f(t,n,r){var i=!0,o="";"string"==typeof t&&""!==t&&(o=t+"_"),o+="commands";var a;r?a=[]:(a=e.Storage.get(o),a=a?e.parseJSON(a):[]);var s=a.length-1;e.extend(this,{append:function(t){i&&a[a.length-1]!==t&&(a.push(t),n&&a.length>n&&(a=a.slice(-n)),s=a.length-1,r||e.Storage.set(o,JSON.stringify(a)))},data:function(){return a},reset:function(){s=a.length-1},last:function(){return a[a.length-1]},end:function(){return s===a.length-1},position:function(){return s},current:function(){return a[s]},next:function(){if(s<a.length-1&&++s,s!==-1)return a[s]},previous:function(){var e=s;if(s>0&&--s,e!==-1)return a[s]},clear:function(){a=[],this.purge()},enabled:function(){return i},enable:function(){i=!0},purge:function(){r||e.Storage.remove(o)},disable:function(){i=!1}})}function p(t,n){var r=n(t);if(r.length){var i=r.shift(),o=new RegExp("^"+e.terminal.escape_regex(i)),a=t.replace(o,"").trim();return{command:t,name:i,args:r,rest:a}}return{command:t,name:"",args:[],rest:""}}function d(){var t=e('<div class="terminal temp"><div class="cmd"><span class="cursor">&nbsp;</span></div></div>').appendTo("body"),n=t.find("span"),r={width:n.width(),height:n.outerHeight()};return t.remove(),r}function h(t){var n=e('<div class="terminal wrap"><span class="cursor">&nbsp;</span></div>').appendTo("body").css("padding",0),r=n.find("span"),i=r[0].getBoundingClientRect().width,o=Math.floor(t.width()/i);if(n.remove(),v(t)){var a=20,s=t.innerWidth()-t.width();o-=Math.ceil((a-s/2)/(i-1))}return o}function m(e){return Math.floor(e.height()/d().height)}function g(){if(window.getSelection||document.getSelection){var e=(window.getSelection||document.getSelection)();return e.text?e.text:e.toString()}if(document.selection)return document.selection.createRange().text}function v(t){return"scroll"==t.css("overflow")||"scroll"==t.css("overflow-y")||(t.is("body")?e("body").height()>e(window).height():t.get(0).scrollHeight>t.innerHeight())}e.omap=function(t,n){var r={};return e.each(t,function(e,i){r[e]=n.call(t,e,i)}),r};var y={clone_object:function(t){var n={};if("object"==typeof t){if(e.isArray(t))return this.clone_array(t);if(null===t)return t;for(var r in t)e.isArray(t[r])?n[r]=this.clone_array(t[r]):"object"==typeof t[r]?n[r]=this.clone_object(t[r]):n[r]=t[r]}return n},clone_array:function(t){if(!e.isFunction(Array.prototype.map))throw new Error("You'r browser don't support ES5 array map use es5-shim");return t.slice(0).map(function(e){return"object"==typeof e?this.clone_object(e):e}.bind(this))}},x=function(e){return y.clone_object(e)},b=function(){var e="test",t=window.localStorage;try{return t.setItem(e,"1"),t.removeItem(e),!0}catch(e){return!1}},w=b();e.extend({Storage:{set:w?n:r,get:w?i:o,remove:w?a:s}});var k=e;k.fn.extend({everyTime:function(e,t,n,r,i){return this.each(function(){k.timer.add(this,e,t,n,r,i)})},oneTime:function(e,t,n){return this.each(function(){k.timer.add(this,e,t,n,1)})},stopTime:function(e,t){return this.each(function(){k.timer.remove(this,e,t)})}}),k.extend({timer:{guid:1,global:{},regex:/^([0-9]+)\s*(.*s)?$/,powers:{ms:1,cs:10,ds:100,s:1e3,das:1e4,hs:1e5,ks:1e6},timeParse:function(e){if(e===t||null===e)return null;var n=this.regex.exec(k.trim(e.toString()));if(n[2]){var r=parseInt(n[1],10),i=this.powers[n[2]]||1;return r*i}return e},add:function(e,t,n,r,i,o){var a=0;if(k.isFunction(n)&&(i||(i=r),r=n,n=t),t=k.timer.timeParse(t),!("number"!=typeof t||isNaN(t)||t<=0)){i&&i.constructor!==Number&&(o=!!i,i=0),i=i||0,o=o||!1,e.$timers||(e.$timers={}),e.$timers[n]||(e.$timers[n]={}),r.$timerID=r.$timerID||this.guid++;var s=function(){o&&s.inProgress||(s.inProgress=!0,(++a>i&&0!==i||r.call(e,a)===!1)&&k.timer.remove(e,n,r),s.inProgress=!1)};s.$timerID=r.$timerID,e.$timers[n][r.$timerID]||(e.$timers[n][r.$timerID]=window.setInterval(s,t)),this.global[n]||(this.global[n]=[]),this.global[n].push(e)}},remove:function(e,t,n){var r,i=e.$timers;if(i){if(t){if(i[t]){if(n)n.$timerID&&(window.clearInterval(i[t][n.$timerID]),delete i[t][n.$timerID]);else for(var o in i[t])i[t].hasOwnProperty(o)&&(window.clearInterval(i[t][o]),delete i[t][o]);for(r in i[t])if(i[t].hasOwnProperty(r))break;r||(r=null,delete i[t])}}else for(var a in i)i.hasOwnProperty(a)&&this.remove(e,a,n);for(r in i)if(i.hasOwnProperty(r))break;r||(e.$timers=null)}}}}),/(msie) ([\w.]+)/.exec(navigator.userAgent.toLowerCase())&&k(window).one("unload",function(){var e=k.timer.global;for(var t in e)if(e.hasOwnProperty(t))for(var n=e[t],r=n.length;--r;)k.timer.remove(n[r],t)}),function(e){if(String.prototype.split.toString().match(/\[native/)){var t,n=String.prototype.split,r=/()??/.exec("")[1]===e;return t=function(t,i,o){if("[object RegExp]"!==Object.prototype.toString.call(i))return n.call(t,i,o);var a,s,l,c,u=[],f=(i.ignoreCase?"i":"")+(i.multiline?"m":"")+(i.extended?"x":"")+(i.sticky?"y":""),p=0;for(i=new RegExp(i.source,f+"g"),t+="",r||(a=new RegExp("^"+i.source+"$(?!\\s)",f)),o=o===e?-1>>>0:o>>>0;(s=i.exec(t))&&(l=s.index+s[0].length,!(l>p&&(u.push(t.slice(p,s.index)),!r&&s.length>1&&s[0].replace(a,function(){for(var t=1;t<arguments.length-2;t++)arguments[t]===e&&(s[t]=e)}),s.length>1&&s.index<t.length&&Array.prototype.push.apply(u,s.slice(1)),c=s[0].length,p=l,u.length>=o)));)i.lastIndex===s.index&&i.lastIndex++;return p===t.length?!c&&i.test("")||u.push(""):u.push(t.slice(p)),u.length>o?u.slice(0,o):u},String.prototype.split=function(e,n){return t(this,e,n)},t}}(),e.fn.caret=function(e){var t=this[0],n="true"===t.contentEditable;if(0==arguments.length){if(window.getSelection){if(n){t.focus();var r=window.getSelection().getRangeAt(0),i=r.cloneRange();return i.selectNodeContents(t),i.setEnd(r.endContainer,r.endOffset),i.toString().length}return t.selectionStart}if(document.selection){if(t.focus(),n){var r=document.selection.createRange(),i=document.body.createTextRange();return i.moveToElementText(t),i.setEndPoint("EndToEnd",r),i.text.length}var e=0,o=t.createTextRange(),i=document.selection.createRange().duplicate(),a=i.getBookmark();for(o.moveToBookmark(a);0!==o.moveStart("character",-1);)e++;return e}return 0}if(e==-1&&(e=this[n?"text":"val"]().length),window.getSelection)n?(t.focus(),window.getSelection().collapse(t.firstChild,e)):t.setSelectionRange(e,e);else if(document.body.createTextRange){var o=document.body.createTextRange();o.moveToElementText(t),o.moveStart("character",e),o.collapse(!0),o.select()}return n||t.focus(),e};var _=function(){var e=document.createElement("div");return e.setAttribute("onpaste","return;"),"function"==typeof e.onpaste}();e.fn.cmd=function(n){function r(){var e=w.is(":focus");O?e||(w.focus(),x.oneTime(10,function(){w.focus()})):e&&w.blur()}function i(){x.oneTime(10,function(){w.val(B),O&&x.oneTime(10,function(){w.caret(W)})})}function o(e){K.toggleClass("inverted")}function a(){F="(reverse-i-search)`"+I+"': ",Y()}function s(){F=M,P=!1,R=null,I=""}function c(t){var n,r,i=D.data(),o=i.length;if(t&&R>0&&(o-=R),I.length>0)for(var s=I.length;s>0;s--){r=e.terminal.escape_regex(I.substring(0,s)),n=new RegExp(r);for(var l=o;l--;)if(n.test(i[l]))return R=i.length-l,x.position(i[l].indexOf(r)),x.set(i[l],!0),X(),void(I.length!==s&&(I=I.substring(0,s),a()))}I=""}function u(){var e=x.width(),t=K[0].getBoundingClientRect().width;k=Math.floor(e/t)}function p(e){var t=e.substring(0,k-A),n=e.substring(k-A);return[t].concat(l(n,k))}function d(e){if(!(U++>0)&&(e.originalEvent&&(e=e.originalEvent),x.isenabled())){var t=x.find("textarea");t.is(":focus")||t.focus(),x.oneTime(100,function(){x.insert(t.val()),t.val(""),i()})}}function h(r){var i,o,l;if(O){if(e.isFunction(n.keydown)&&(i=n.keydown(r),i!==t))return i;if(38===r.which||80===r.which&&r.ctrlKey||(J=!0),!P||35!==r.which&&36!==r.which&&37!==r.which&&38!==r.which&&39!==r.which&&40!==r.which&&13!==r.which&&27!==r.which){if(r.altKey)return 68!==r.which||(x.set(B.slice(0,W)+B.slice(W).replace(/ *[^ ]+ *(?= )|[^ ]+$/,""),!0),!1);if(13===r.keyCode)if(r.shiftKey)x.insert("\n");else{(D&&B&&!q&&e.isFunction(n.historyFilter)&&n.historyFilter(B)||n.historyFilter instanceof RegExp&&B.match(n.historyFilter)||!n.historyFilter)&&D.append(B);var u=B;D.reset(),x.set(""),n.commands&&n.commands(u),e.isFunction(F)&&Y(),e(".clipboard").val("")}else if(8===r.which){if(P?(I=I.slice(0,-1),a()):""!==B&&W>0&&x.delete(-1),T)return!0}else if(67===r.which&&r.ctrlKey&&r.shiftKey)z=g();else if(86===r.which&&r.ctrlKey&&r.shiftKey)""!==z&&x.insert(z);else if(9!==r.which||r.ctrlKey||r.altKey){if(46===r.which)return void x.delete(1);if(D&&38===r.which&&!r.ctrlKey||80===r.which&&r.ctrlKey)J?(L=B,x.set(D.current())):x.set(D.previous()),J=!1;else if(D&&40===r.which&&!r.ctrlKey||78===r.which&&r.ctrlKey)x.set(D.end()?L:D.next());else if(37===r.which||66===r.which&&r.ctrlKey)if(r.ctrlKey&&66!==r.which){l=W-1,o=0," "===B[l]&&--l;for(var f=l;f>0;--f){if(" "===B[f]&&" "!==B[f+1]){o=f+1;break}if("\n"===B[f]&&"\n"!==B[f+1]){o=f;break}}x.position(o)}else W>0&&(x.position(-1,!0),X());else if(82===r.which&&r.ctrlKey)P?c(!0):(M=F,a(),L=B,x.set(""),X(),P=!0);else if(71==r.which&&r.ctrlKey)P&&(F=M,Y(),x.set(L),X(),P=!1,I="");else if(39===r.which||70===r.which&&r.ctrlKey)if(r.ctrlKey&&70!==r.which){" "===B[W]&&++W;var p=/\S[\n\s]{2,}|[\n\s]+\S?/,m=B.slice(W).match(p);!m||m[0].match(/^\s+$/)?x.position(B.length):" "!==m[0][0]?W+=m.index+1:(W+=m.index+m[0].length-1," "!==m[0][m[0].length-1]&&--W),X()}else W<B.length&&x.position(1,!0);else{if(123===r.which)return;if(36===r.which)x.position(0);else if(35===r.which)x.position(B.length);else{if(r.shiftKey&&45==r.which)return w.val(""),U=0,void(_?w.focus():d(r));if(!r.ctrlKey&&!r.metaKey)return Q=!1,void(G=!0);if(192===r.which)return;if(r.metaKey){if(82===r.which)return;if(76===r.which)return}if(r.shiftKey){if(84===r.which)return}else{if(81===r.which){if(""!==B&&0!==W){var v=B.slice(0,W).match(/([^ ]+ *$)/);H=x.delete(-v[0].length)}return!1}if(72===r.which)return""!==B&&W>0&&x.delete(-1),!1;if(65===r.which)x.position(0);else if(69===r.which)x.position(B.length);else{if(88===r.which||67===r.which||84===r.which)return;if(89===r.which)""!==H&&x.insert(H);else{if(86===r.which||118===r.which)return w.val(""),U=0,void(_?(w.focus(),w.on("input",function e(t){d(t),w.off("input",e)})):d(r));if(75===r.which)H=x.delete(B.length-W);else if(85===r.which)""!==B&&0!==W&&(H=x.delete(-W));else if(17===r.which)return!1}}}}}}else x.insert("\t")}else s(),Y(),27===r.which&&x.set(""),X(),h.call(this,r);r.preventDefault()}}function m(){e.isFunction(n.onCommandChange)&&n.onCommandChange(B)}function v(r){var i;if(G=!1,(!r.ctrlKey&&!r.metaKey||[99,118,86].indexOf(r.which)===-1)&&!Q){if(!P&&e.isFunction(n.keypress)&&(i=n.keypress(r)),i!==t&&!i)return i;if(O){if(e.inArray(r.which,[38,13,0,8])>-1&&(38!==r.which||!r.shiftKey)){if(123==r.keyCode)return;return!1}if(!r.ctrlKey&&(!r.altKey||100!==r.which)||r.altKey)return P?(I+=String.fromCharCode(r.which),c(),a()):x.insert(String.fromCharCode(r.which)),!1}}}function y(e){if(G){var t=w.val();(t||8==e.which)&&x.set(t)}}var x=this,b=x.data("cmd");if(b)return b;x.addClass("cmd"),x.append('<span class="prompt"></span><span></span><span class="cursor">&nbsp;</span><span></span>');var w=e("<textarea>").attr({autocapitalize:"off",spellcheck:"false"}).addClass("clipboard").appendTo(x);n.width&&x.width(n.width);var k,A,M,L,F,O,E,D,N,j=x.find(".prompt"),P=!1,I="",R=null,q=n.mask||!1,B="",z="",H="",W=0,$=n.historySize||60,K=x.find(".cursor"),U=0;if(C&&!S)N=function(e){e?K.addClass("blink"):K.removeClass("blink")};else{var V=!1;N=function(e){e&&!V?(V=!0,K.addClass("inverted blink"),x.everyTime(500,"blink",o)):V&&!e&&(V=!1,x.stopTime("blink",o),K.removeClass("inverted blink"))}}var G,X=function(t){function n(t,n){var r=t.length;if(n===r)a.html(e.terminal.encode(t)),K.html("&nbsp;"),s.html("");else if(0===n)a.html(""),K.html(e.terminal.encode(t.slice(0,1))),s.html(e.terminal.encode(t.slice(1)));else{var i=t.slice(0,n);a.html(e.terminal.encode(i));var o=t.slice(n,n+1);K.html(e.terminal.encode(o)),n===t.length-1?s.html(""):s.html(e.terminal.encode(t.slice(n+1)))}}function r(t){return"<div>"+e.terminal.encode(t)+"</div>"}function i(t){var n=s;e.each(t,function(t,i){n=e(r(i)).insertAfter(n).addClass("clear")})}function o(t){e.each(t,function(e,t){a.before(r(t))})}var a=K.prev(),s=K.next();return function(){var c,u;switch(typeof q){case"boolean":c=q?B.replace(/./g,"*"):B;break;case"string":c=B.replace(/./g,q)}var f,d;if(t.find("div").remove(),a.html(""),c.length>k-A-1||c.match(/\n/)){var h,m=c.match(/\t/g),g=m?3*m.length:0;if(m&&(c=c.replace(/\t/g,"\0\0\0\0")),c.match(/\n/)){var v=c.split("\n");for(d=k-A-1,f=0;f<v.length-1;++f)v[f]+=" ";for(v[0].length>d?(h=[v[0].substring(0,d)],u=v[0].substring(d),h=h.concat(l(u,k))):h=[v[0]],f=1;f<v.length;++f)v[f].length>k?h=h.concat(l(v[f],k)):h.push(v[f])}else h=p(c);if(m&&(h=e.map(h,function(e){return e.replace(/\x00\x00\x00\x00/g,"\t")})),d=h[0].length,0===d&&1===h.length);else if(W<d)n(h[0],W),i(h.slice(1));else if(W===d)a.before(r(h[0])),n(h[1],0),i(h.slice(2));else{var y=h.length;if(W<d)n(h[0],W),i(h.slice(1));else if(W===d)a.before(r(h[0])),n(h[1],0),i(h.slice(2));else{var x=h.slice(-1)[0],b=c.length-W-g,w=x.length,_=0;if(b<=w)o(h.slice(0,-1)),_=w===b?0:w-b,n(x,_);else if(3===y)u=e.terminal.encode(h[0]),a.before("<div>"+u+"</div>"),n(h[1],W-d-1),u=e.terminal.encode(h[2]),s.after('<div class="clear">'+u+"</div>");else{var C,S;for(_=W,f=0;f<h.length;++f){var T=h[f].length;if(!(_>T))break;_-=T}S=h[f],C=f,_===S.length&&(_=0,S=h[++C]),n(S,_),o(h.slice(0,C)),i(h.slice(C+1))}}}}else""===c?(a.html(""),K.html("&nbsp;"),s.html("")):n(c,W)}}(x),Y=function(){function t(t){j.html(e.terminal.format(e.terminal.encode(t))),A=j.text().length}return function(){switch(typeof F){case"string":t(F);break;case"function":F(t)}}}(),J=!0,Q=!1;e.extend(x,{name:function(e){if(e!==t){E=e;var r=D&&D.enabled()||!D;return D=new f(e,$,"memory"==n.history),r||D.disable(),x}return E},purge:function(){return D.clear(),x},history:function(){return D},delete:function(e,t){var n;return 0===e?x:(e<0?W>0&&(n=B.slice(0,W).slice(e),B=B.slice(0,W+e)+B.slice(W,B.length),t?m():x.position(W+e)):""!==B&&W<B.length&&(n=B.slice(W).slice(0,e),B=B.slice(0,W)+B.slice(W+e,B.length),m()),X(),i(),n)},set:function(e,n){return e!==t&&(B=e,n||x.position(B.length),X(),i(),m()),x},insert:function(e,t){return W===B.length?B+=e:B=0===W?e+B:B.slice(0,W)+e+B.slice(W),t?i():x.position(e.length,!0),X(),m(),x},get:function(){return B},commands:function(e){return e?(n.commands=e,x):e},destroy:function(){return Z.unbind("keypress.cmd",v),Z.unbind("keydown.cmd",h),Z.unbind("paste.cmd",d),Z.unbind("input.cmd",y),x.stopTime("blink",o),x.find(".cursor").next().remove().end().prev().remove().end().remove(),x.find(".prompt, .clipboard").remove(),x.removeClass("cmd").removeData("cmd"),x},prompt:function(e){if(e===t)return F;if("string"!=typeof e&&"function"!=typeof e)throw new Error("prompt must be a function or string");return F=e,Y(),X(),x},kill_text:function(){return H},position:function(t,r){return"number"==typeof t?(r?W+=t:W=t<0?0:t>B.length?B.length:t,e.isFunction(n.onPositionChange)&&n.onPositionChange(W),X(),i(),x):W},visible:function(){var e=x.visible;return function(){e.apply(x,[]),X(),Y()}}(),show:function(){var e=x.show;return function(){e.apply(x,[]),X(),Y()}}(),resize:function(e){return e?k=e:u(),X(),x},enable:function(){return O=!0,x.addClass("enabled"),w.caret(W),N(!0),r(),x},isenabled:function(){return O},disable:function(){return O=!1,x.removeClass("enabled"),N(!1),r(),x},mask:function(e){return"undefined"==typeof e?q:(q=e,X(),x)}}),x.name(n.name||n.prompt||""),F="string"==typeof n.prompt?n.prompt:"> ",Y(),n.enabled!==t&&n.enabled!==!0||x.enable();var Z=e(document.documentElement||window);return Z.bind("keypress.cmd",v).bind("keydown.cmd",h).bind("input.cmd",y),x.data("cmd",x),x};var C=function(){var e=!1,n="animation",r="",i="Webkit Moz O ms Khtml".split(" "),o="",a=document.createElement("div");if(a.style.animationName&&(e=!0),e===!1)for(var s=0;s<i.length;s++){var l=i[s]+"AnimationName";if(a.style[l]!==t){o=i[s],n=o+"Animation",r="-"+o.toLowerCase()+"-",e=!0;break}}return e}(),S=navigator.userAgent.toLowerCase().indexOf("android")!=-1,T=function(){return"ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch}(),A=/(\[\[[!gbiuso]*;[^;]*;[^\]]*\](?:[^\]]*\\\][^\]]*|[^\]]*|[^\[]*\[[^\]]*)\]?)/i,M=/\[\[([!gbiuso]*);([^;]*);([^;\]]*);?([^;\]]*);?([^\]]*)\]([^\]]*\\\][^\]]*|[^\]]*|[^\[]*\[[^\]]*)\]?/gi,L=/\[\[([!gbiuso]*;[^;\]]*;[^;\]]*(?:;|[^\]()]*);?[^\]]*)\]([^\]]*\\\][^\]]*|[^\]]*|[^\[]*\[[^\]]*)\]?/gi,F=/\[\[([!gbiuso]*;[^;\]]*;[^;\]]*(?:;|[^\]()]*);?[^\]]*)\]([^\]]*\\\][^\]]*|[^\]]*|[^\[]*\[[^\]]*)\]/gi,O=/^\[\[([!gbiuso]*;[^;\]]*;[^;\]]*(?:;|[^\]()]*);?[^\]]*)\]([^\]]*\\\][^\]]*|[^\]]*|[^\[]*\[[^\]]*)\]$/gi,E=/^#([0-9a-f]{3}|[0-9a-f]{6})$/i,D=/(\bhttps?:\/\/(?:(?:(?!&[^;]+;)|(?=&amp;))[^\s"'<>\]\[)])+\b)/gi,N=/\b(https?:\/\/(?:(?:(?!&[^;]+;)|(?=&amp;))[^\s"'<>\][)])+)\b(?![^[\]]*])/gi,j=/((([^<>('")[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,})))/g,P=/('[^']*'|"(\\"|[^"])*"|(?:\/(\\\/|[^\/])+\/[gimy]*)(?=:? |$)|(\\ |[^ ])+|[\w-]+)/gi,I=/(\[\[[!gbiuso]*;[^;]*;[^\]]*\])/i,R=/^(\[\[[!gbiuso]*;[^;]*;[^\]]*\])/i,q=/\[\[[!gbiuso]*;[^;]*;[^\]]*\]?$/i,B=/(\[\[(?:[^\]]|\\\])*\]\])/;e.terminal={version:"0.11.23",color_names:["black","silver","gray","white","maroon","red","purple","fuchsia","green","lime","olive","yellow","navy","blue","teal","aqua","aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","green","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],valid_color:function(t){return!!t.match(E)||e.inArray(t.toLowerCase(),e.terminal.color_names)!==-1},escape_regex:function(e){if("string"==typeof e){var t=/([-\\\^$\[\]()+{}?*.|])/g;return e.replace(t,"\\$1")}},have_formatting:function(e){return"string"==typeof e&&!!e.match(F)},is_formatting:function(e){return"string"==typeof e&&!!e.match(O)},format_split:function(e){return e.split(A)},split_equal:function(t,n,r){function i(){return"&nbsp;"==p.substring(g-6,g)||" "==p.substring(g-1,g)}for(var o=!1,a=!1,s="",l=[],c=t.replace(L,function(e,t,n){var r=t.match(/;/g).length;if(r>=4)return e;r=2==r?";;":3==r?";":"";var i=n.replace(/\\\]/g,"&#93;").replace(/\n/g,"\\n").replace(/&nbsp;/g," ");return"[["+t+r+i+"]"+n+"]"}).split(/\n/g),u=0,f=c.length;u<f;++u)if(""!==c[u])for(var p=c[u],d=0,h=0,m=-1,g=0,v=p.length;g<v;++g){if(p.substring(g).match(R))o=!0,a=!1;else if(o&&"]"===p[g])a?(o=!1,a=!1):a=!0;else if(o&&a||!o){if("&"===p[g]){var y=p.substring(g).match(/^(&[^;]+;)/);if(!y)throw new Error("Unclosed html entity in line "+(u+1)+" at char "+(g+1));g+=y[1].length-2,g===v-1&&l.push(x+y[1]);continue}"]"===p[g]&&"\\"===p[g-1]?--h:++h}if(i()&&(o&&a||!o||"["===p[g]&&"["===p[g+1])&&(m=g),(h===n||g===v-1)&&(o&&a||!o)){var x,b=e.terminal.strip(p.substring(m));b=e("<span>"+b+"</span>").text();var w=b.length;b=b.substring(0,g+n+1);var k=!!b.match(/\s/)||g+n+1>w;r&&m!=-1&&g!==v-1&&k?(x=p.substring(d,m),g=m-1):x=p.substring(d,g+1),r&&(x=x.replace(/(&nbsp;|\s)+$/g,"")),m=-1,d=g+1,h=0,s&&(x=s+x,x.match("]")&&(s=""));var _=x.match(L);if(_){var C=_[_.length-1];if("]"!==C[C.length-1])s=C.match(I)[1],x+="]";else if(x.match(q)){x.length;x=x.replace(q,""),s=C.match(I)[1]}}l.push(x)}}else l.push("");return l},encode:function(e){return e=e.replace(/&(?!#[0-9]+;|[a-zA-Z]+;)/g,"&amp;"),e.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/ /g,"&nbsp;").replace(/\t/g,"&nbsp;&nbsp;&nbsp;&nbsp;")},escape_formatting:function(t){return e.terminal.escape_brackets(e.terminal.encode(t))},format:function(t,n){var r=e.extend({},{linksNoReferrer:!1},n||{});if("string"==typeof t){var i=e.terminal.format_split(t);return t=e.map(i,function(t){return""===t?t:e.terminal.is_formatting(t)?(t=t.replace(/\[\[[^\]]+\]/,function(e){return e.replace(/&nbsp;/g," ")}),t.replace(M,function(t,n,i,o,a,s,l){if(""===l)return"";l=l.replace(/\\]/g,"]");var c="";n.indexOf("b")!==-1&&(c+="font-weight:bold;");var u=[];n.indexOf("u")!==-1&&u.push("underline"),n.indexOf("s")!==-1&&u.push("line-through"),n.indexOf("o")!==-1&&u.push("overline"),u.length&&(c+="text-decoration:"+u.join(" ")+";"),n.indexOf("i")!==-1&&(c+="font-style:italic;"),e.terminal.valid_color(i)&&(c+="color:"+i+";",n.indexOf("g")!==-1&&(c+="text-shadow:0 0 5px "+i+";")),e.terminal.valid_color(o)&&(c+="background-color:"+o);var f;f=""===s?l:s.replace(/&#93;/g,"]");var p;return n.indexOf("!")!==-1?f.match(j)?p='<a href="mailto:'+f+'" ':(p='<a target="_blank" href="'+f+'" ',r.linksNoReferrer&&(p+='rel="noreferrer" ')):p="<span",""!==c&&(p+=' style="'+c+'"'),""!==a&&(p+=' class="'+a+'"'),p+=n.indexOf("!")!==-1?">"+l+"</a>":' data-text="'+f.replace('"',"&quote;")+'">'+l+"</span>"})):"<span>"+t.replace(/\\\]/g,"]")+"</span>"}).join(""),t.replace(/<span><br\s*\/?><\/span>/gi,"<br/>")}return""},escape_brackets:function(e){return e.replace(/\[/g,"&#91;").replace(/\]/g,"&#93;")},strip:function(e){return e.replace(M,"$6")},active:function(){return Y.front()},last_id:function(){var e=Y.length();if(e)return e-1},parseArguments:function(t){return e.terminal.parse_arguments(t)},splitArguments:function(t){return e.terminal.split_arguments(t)},parseCommand:function(t){return e.terminal.parse_command(t)},splitCommand:function(t){return e.terminal.split_command(t)},parse_arguments:function(t){var n=/^[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?$/;return e.map(t.match(P)||[],function(e){if("'"===e[0]&&"'"===e[e.length-1])return e.replace(/^'|'$/g,"");if('"'===e[0]&&'"'===e[e.length-1])return e=e.replace(/^"|"$/g,"").replace(/\\([" ])/g,"$1"),e.replace(/\\\\|\\t|\\n/g,function(e){return"t"===e[1]?"\t":"n"===e[1]?"\n":"\\"}).replace(/\\x([0-9a-f]+)/gi,function(e,t){return String.fromCharCode(parseInt(t,16))}).replace(/\\0([0-7]+)/g,function(e,t){return String.fromCharCode(parseInt(t,8))});if(e.match(/^\/(\\\/|[^\/])+\/[gimy]*$/)){var t=e.match(/^\/([^\/]+)\/([^\/]*)$/);return new RegExp(t[1],t[2])}return e.match(/^-?[0-9]+$/)?parseInt(e,10):e.match(n)?parseFloat(e):e.replace(/\\ /g," ")})},split_arguments:function(t){return e.map(t.match(P)||[],function(e){return"'"===e[0]&&"'"===e[e.length-1]?e.replace(/^'|'$/g,""):'"'===e[0]&&'"'===e[e.length-1]?e.replace(/^"|"$/g,"").replace(/\\([" ])/g,"$1"):e.match(/\/.*\/[gimy]*$/)?e:e.replace(/\\ /g," ")})},parse_command:function(t){return p(t,e.terminal.parse_arguments)},split_command:function(t){return p(t,e.terminal.split_arguments)},extended_command:function(e,t){try{Q=!1,e.exec(t,!0).then(function(){Q=!0})}catch(e){}}},e.fn.visible=function(){return this.css("visibility","visible")},e.fn.hidden=function(){return this.css("visibility","hidden")};var z={};e.jrpc=function(t,n,r,i,o){z[t]=z[t]||0;var a=JSON.stringify({jsonrpc:"2.0",method:n,params:r,id:++z[t]});return e.ajax({url:t,data:a,success:function(t,n,r){var a=r.getResponseHeader("Content-Type");if(!a.match(/(application|text)\/json/)){var s="Response Content-Type is neither application/json nor text/json";if(!console||!console.warn)throw new Error("WARN: "+s);console.warn(s)}var l;try{l=e.parseJSON(t)}catch(e){if(!o)throw new Error("Invalid JSON");return void o(r,"Invalid JSON",e)}i(l,n,r)},error:o,contentType:"application/json",dataType:"text",async:!0,cache:!1,type:"POST"})};var H=!e.terminal.version.match(/^\{\{/),W="Copyright (c) 2011-2016 Jakub Jankiewicz <http://jcubic.pl>",$=H?" v. "+e.terminal.version:" ",K=new RegExp(" {"+$.length+"}$"),U="jQuery Terminal Emulator"+(H?$:""),V=[["jQuery Terminal","(c) 2011-2016 jcubic"],[U,W.replace(/^Copyright | *<.*>/g,"")],[U,W.replace(/^Copyright /,"")],["      _______                 ________                        __","     / / _  /_ ____________ _/__  ___/______________  _____  / /"," __ / / // / // / _  / _/ // / / / _  / _/     / /  \\/ / _ \\/ /","/  / / // / // / ___/ // // / / / ___/ // / / / / /\\  / // / /__","\\___/____ \\\\__/____/_/ \\__ / /_/____/_//_/_/_/ /_/  \\/\\__\\_\\___/","         \\/          /____/                                   ".replace(K," ")+$,W],["      __ _____                     ________                              __","     / // _  /__ __ _____ ___ __ _/__  ___/__ ___ ______ __ __  __ ___  / /"," __ / // // // // // _  // _// // / / // _  // _//     // //  \\/ // _ \\/ /","/  / // // // // // ___// / / // / / // ___// / / / / // // /\\  // // / /__","\\___//____ \\\\___//____//_/ _\\_  / /_//____//_/ /_/ /_//_//_/ /_/ \\__\\_\\___/","          \\/              /____/                                          ".replace(K,"")+$,W]];e.terminal.defaults={prompt:"> ",history:!0,exit:!0,clear:!0,enabled:!0,historySize:60,maskChar:"*",wrap:!0,checkArity:!0,raw:!1,exceptionHandler:null,memory:!1,cancelableAjax:!0,processArguments:!0,linksNoReferrer:!1,processRPCResponse:null,Token:!0,convertLinks:!0,historyState:!1,echoCommand:!0,scrollOnEcho:!0,login:null,outputLimit:-1,formatters:[],onAjaxError:null,scrollBottomOffset:20,onRPCError:null,completion:!1,historyFilter:null,onInit:e.noop,onClear:e.noop,onBlur:e.noop,onFocus:e.noop,onTerminalChange:e.noop,onExit:e.noop,keypress:e.noop,keydown:e.noop,strings:{wrongPasswordTryAgain:"Wrong password try again!",wrongPassword:"Wrong password!",ajaxAbortError:"Error while aborting ajax call!",wrongArity:"Wrong number of arguments. Function '%s' expects %s got %s!",commandNotFound:"Command '%s' Not Found!",oneRPCWithIgnore:"You can use only one rpc with ignoreSystemDescribe",oneInterpreterFunction:"You can't use more than one function (rpcwith ignoreSystemDescribe counts as one)",loginFunctionMissing:"You didn't specify a login function",noTokenError:"Access denied (no token)",serverResponse:"Server responded",wrongGreetings:"Wrong value of greetings parameter",notWhileLogin:"You can't call `%s' function while in login",loginIsNotAFunction:"Authenticate must be a function",canExitError:"You can't exit from main interpreter",invalidCompletion:"Invalid completion",invalidSelector:'Sorry, but terminal said that "%s" is not valid selector!',invalidTerminalId:"Invalid Terminal ID",login:"login",password:"password",recursiveCall:"Recursive call detected, skip"}};var G,X=[],Y=new c,J=[],Q=!1,Z=!0,ee=!0;e.fn.terminal=function(n,r){function i(t){t&&(this.storage={}),this.set=function(n,r){t?this.storage[n]=r:e.Storage.set(n,r);
0 ignored issues
show
Complexity Best Practice introduced by
There is no return statement if s < a.length - 1 && ++s, s !== -1 is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Unused Code introduced by
The assignment to variable s seems to be never used. Consider removing it.
Loading history...
Bug introduced by
The variable c seems to not be initialized for all possible execution paths.
Loading history...
Bug introduced by
The variable x seems to not be initialized for all possible execution paths.
Loading history...
Comprehensibility introduced by
Usage of the sequence operator is discouraged, since it may lead to obfuscated code.

The sequence or comma operator allows the inclusion of multiple expressions where only is permitted. The result of the sequence is the value of the last expression.

This operator is most often used in for statements.

Used in another places it can make code hard to read, especially when people do not realize it even exists as a seperate operator.

This check looks for usage of the sequence operator in locations where it is not necessary and could be replaced by a series of expressions or statements.

var a,b,c;

a = 1, b = 1,  c= 3;

could just as well be written as:

var a,b,c;

a = 1;
b = 1;
c = 3;

To learn more about the sequence operator, please refer to the MDN.

Loading history...
Unused Code introduced by
The variable n seems to be never used. Consider removing it.
Loading history...
Unused Code introduced by
The loop variable n is initialized by the loop but not used in the test. Consider using another type of loop if this is the intended behavior.
Loading history...
Bug introduced by
The variable W seems to not be initialized for all possible execution paths. Are you sure slice handles undefined variables?
Loading history...
Coding Style Best Practice introduced by
Curly braces around statements make for more readable code and help prevent bugs when you add further statements.

Consider adding curly braces around all statements when they are executed conditionally. This is optional if there is only one statement, but leaving them out can lead to unexpected behaviour if another statement is added later.

Consider:

if (a > 0)
    b = 42;

If you or someone else later decides to put another statement in, only the first statement will be executed.

if (a > 0)
    console.log("a > 0");
    b = 42;

In this case the statement b = 42 will always be executed, while the logging statement will be executed conditionally.

if (a > 0) {
    console.log("a > 0");
    b = 42;
}

ensures that the proper code will be executed conditionally no matter how many statements are added or removed.

Loading history...
Coding Style Best Practice introduced by
By convention, constructors like c should be capitalized.
Loading history...
Bug introduced by
The variable DocumentTouch seems to be never declared. If this is a global, consider adding a /** global: DocumentTouch */ comment.

This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.

To learn more about declaring variables in Javascript, see the MDN.

Loading history...
Complexity Best Practice introduced by
There is no return statement if document.selection is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Bug introduced by
The variable n seems to not be initialized for all possible execution paths.
Loading history...
Bug introduced by
The variable a seems to not be initialized for all possible execution paths. Are you sure replace handles undefined variables?
Loading history...
Coding Style Best Practice introduced by
By convention, constructors like u should be capitalized.
Loading history...
Complexity Best Practice introduced by
There is no return statement if !r.ctrlKey && !r.altKey ...!== r.which || r.altKey is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Complexity Best Practice introduced by
There is no return statement if n.filter(Boolean).length is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Bug introduced by
The variable e seems to be never initialized.
Loading history...
Compatibility Best Practice introduced by
You are extending the built-in type String. This may have unintended consequences on other objects using this built-in type. Consider subclassing instead.
Loading history...
Complexity Best Practice introduced by
There is no return statement if O is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Coding Style introduced by
As per coding-style, switch statements should have a default case.
Loading history...
Complexity Best Practice introduced by
There is no return statement if e is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Unused Code introduced by
The assignment to variable n seems to be never used. Consider removing it.
Loading history...
Best Practice introduced by
There is no return statement in this branch, but you do return something in other branches. Did you maybe miss it? If you do not want to return anything, consider adding return undefined; explicitly.
Loading history...
Bug introduced by
The call to r seems to have too many arguments starting with -1.
Loading history...
Unused Code introduced by
The assignment to variable e seems to be never used. Consider removing it.
Loading history...
Unused Code introduced by
The variable r seems to be never used. Consider removing it.
Loading history...
Complexity Best Practice introduced by
There is no return statement if n.length is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Bug introduced by
The variable i does not seem to be initialized in case !P && e.isFunction(n.key...press(r), i !== t && !i on line 55 is false. Are you sure this can never be the case?
Loading history...
Bug introduced by
The variable navigator seems to be never declared. If this is a global, consider adding a /** global: navigator */ comment.

This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.

To learn more about declaring variables in Javascript, see the MDN.

Loading history...
Complexity Best Practice introduced by
There is no return statement if "string" == typeof e is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Complexity Best Practice introduced by
There is no return statement if String.prototype.split.toString().match(\[native) is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Unused Code introduced by
The assignment to variable p seems to be never used. Consider removing it.
Loading history...
introduced by
The result of the property access to x.length is not used.
Loading history...
Bug introduced by
The variable D seems to not be initialized for all possible execution paths.
Loading history...
Bug introduced by
The variable localStorage seems to be never declared. If this is a global, consider adding a /** global: localStorage */ comment.

This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.

To learn more about declaring variables in Javascript, see the MDN.

Loading history...
Comprehensibility Naming Best Practice introduced by
The variable i already seems to be declared on line 55. Consider using another variable name or omitting the var keyword.

This check looks for variables that are declared in multiple lines. There may be several reasons for this.

In the simplest case the variable name was reused by mistake. This may lead to very hard to locate bugs.

If you want to reuse a variable for another purpose, consider declaring it at or near the top of your function and just assigning to it subsequently so it is always declared.

Loading history...
Complexity introduced by
A for in loop automatically includes the property of any prototype object, consider checking the key using hasOwnProperty.

When iterating over the keys of an object, this includes not only the keys of the object, but also keys contained in the prototype of that object. It is generally a best practice to check for these keys specifically:

var someObject;
for (var key in someObject) {
    if ( ! someObject.hasOwnProperty(key)) {
        continue; // Skip keys from the prototype.
    }

    doSomethingWith(key);
}
Loading history...
Complexity Best Practice introduced by
There is no return statement if s > 0 && --s, e !== -1 is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
introduced by
The for loop does not have a body. Maybe you have misplaced a semicolon. If you do wish to have a loop without a body, use an empty body {}.
Loading history...
Coding Style Best Practice introduced by
By convention, constructors like f should be capitalized.
Loading history...
Bug introduced by
The variable B seems to not be initialized for all possible execution paths.
Loading history...
Complexity Best Practice introduced by
There is no return statement if G = !1, !r.ctrlKey && !r...f(r.which) === -1 && !Q is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Comprehensibility Naming Best Practice introduced by
The variable r already seems to be declared on line 55. Consider using another variable name or omitting the var keyword.

This check looks for variables that are declared in multiple lines. There may be several reasons for this.

In the simplest case the variable name was reused by mistake. This may lead to very hard to locate bugs.

If you want to reuse a variable for another purpose, consider declaring it at or near the top of your function and just assigning to it subsequently so it is always declared.

Loading history...
Unused Code introduced by
The parameter e is not used and could be removed.

This check looks for parameters in functions that are not used in the function body and are not followed by other parameters which are used inside the function.

Loading history...
Comprehensibility Naming Best Practice introduced by
The variable o already seems to be declared on line 55. Consider using another variable name or omitting the var keyword.

This check looks for variables that are declared in multiple lines. There may be several reasons for this.

In the simplest case the variable name was reused by mistake. This may lead to very hard to locate bugs.

If you want to reuse a variable for another purpose, consider declaring it at or near the top of your function and just assigning to it subsequently so it is always declared.

Loading history...
56
},this.get=function(n){return t?this.storage[n]:e.Storage.get(n)},this.remove=function(n){t?delete this.storage[n]:e.Storage.remove(n)}}function o(t){return e.isFunction(Ce.processArguments)?p(t,Ce.processArguments):Ce.processArguments?e.terminal.parse_command(t):e.terminal.split_command(t)}function a(t){"string"==typeof t?le.echo(t):t instanceof Array?le.echo(e.map(t,function(e){return JSON.stringify(e)}).join(" ")):"object"==typeof t?le.echo(JSON.stringify(t)):le.echo(t)}function s(t){var n=/(.*):([0-9]+):([0-9]+)$/,r=t.match(n);r&&(le.pause(),e.get(r[1],function(t){var n=location.href.replace(/[^\/]+$/,""),i=r[1].replace(n,"");le.echo("[[b;white;]"+i+"]");var o=t.split("\n"),a=+r[2]-1;le.echo(o.slice(a-2,a+3).map(function(t,n){return 2==n&&(t="[[;#f00;]"+e.terminal.escape_brackets(t)+"]"),"["+(a+n)+"]: "+t}).join("\n")).resume()},"text"))}function l(t){if(e.isFunction(Ce.onRPCError))Ce.onRPCError.call(le,t);else if(le.error("&#91;RPC&#93; "+t.message),t.error&&t.error.message){t=t.error;var n="\t"+t.message;t.file&&(n+=' in file "'+t.file.replace(/.*\//,"")+'"'),t.at&&(n+=" at line "+t.at),le.error(n)}}function c(t,n){var r=function(n,r){le.pause(),e.jrpc(t,n,r,function(t){t.error?l(t.error):e.isFunction(Ce.processRPCResponse)?Ce.processRPCResponse.call(le,t.result,le):a(t.result),le.resume()},d)};return function(e,t){if(""!==e){try{e=o(e)}catch(e){return void t.error(e.toString())}if(n&&"help"!==e.name){var i=t.token();i?r(e.name,[i].concat(e.args)):t.error("&#91;AUTH&#93; "+Te.noTokenError)}else r(e.name,e.args)}}}function f(n,r,i,a){return function(s,l){if(""!==s){var c;try{c=o(s)}catch(e){return void le.error(e.toString())}var u=n[c.name],p=e.type(u);if("function"===p){if(!r||u.length===c.args.length)return u.apply(le,c.args);le.error("&#91;Arity&#93; "+sprintf(Te.wrongArity,c.name,u.length,c.args.length))}else if("object"===p||"string"===p){var d=[];"object"===p&&(d=Object.keys(u),u=f(u,r,i)),l.push(u,{prompt:c.name+"> ",name:c.name,completion:"object"===p?d:t})}else e.isFunction(a)?a(s,le):e.isFunction(Ce.onCommandNotFound)?Ce.onCommandNotFound(s,le):l.error(sprintf(Te.commandNotFound,c.name))}}}function d(t,n,r){le.resume(),e.isFunction(Ce.onAjaxError)?Ce.onAjaxError.call(le,t,n,r):"abort"!==n&&le.error("&#91;AJAX&#93; "+n+" - "+Te.serverResponse+": \n"+e.terminal.escape_brackets(t.responseText))}function y(t,n,r){e.jrpc(t,"system.describe",[],function(i){if(i.procs){var o={};e.each(i.procs,function(r,i){o[i.name]=function(){var r=n&&"help"!=i.name,o=Array.prototype.slice.call(arguments),s=o.length+(r?1:0);if(Ce.checkArity&&i.params&&i.params.length!==s)le.error("&#91;Arity&#93; "+sprintf(Te.wrongArity,i.name,i.params.length,s));else{if(le.pause(),r){var c=le.token(!0);c?o=[c].concat(o):le.error("&#91;AUTH&#93; "+Te.noTokenError)}e.jrpc(t,i.name,o,function(t){t.error?l(t.error):e.isFunction(Ce.processRPCResponse)?Ce.processRPCResponse.call(le,t.result,le):a(t.result),le.resume()},d)}}}),o.help=o.help||function(t){if("undefined"==typeof t)le.echo("Available commands: "+i.procs.map(function(e){return e.name}).join(", ")+", help");else{var n=!1;if(e.each(i.procs,function(e,r){if(r.name==t){n=!0;var i="";return i+="[[bu;#fff;]"+r.name+"]",r.params&&(i+=" "+r.params.join(" ")),r.help&&(i+="\n"+r.help),le.echo(i),!1}}),!n)if("help"==t)le.echo("[[bu;#fff;]help] [method]\ndisplay help for the method or list of methods if not specified");else{var r="Method `"+t.toString()+"' not found ";le.error(r)}}},r(o)}else r(null)},function(){r(null)})}function b(t,n,r){r=r||e.noop;var i,o,a=e.type(t),s={},l=0;if("array"===a)i={},function t(r,a){if(r.length){var s=r[0],u=r.slice(1),f=e.type(s);"string"===f?(l++,le.pause(),Ce.ignoreSystemDescribe?(1===l?o=c(s,n):le.error(Te.oneRPCWithIgnore),t(u,a)):y(s,n,function(n){n&&e.extend(i,n),le.resume(),t(u,a)})):"function"===f?(o?le.error(Te.oneInterpreterFunction):o=s,t(u,a)):"object"===f&&(e.extend(i,s),t(u,a))}else a()}(t,function(){r({interpreter:f(i,!1,n,o),completion:Object.keys(i)})});else if("string"===a)Ce.ignoreSystemDescribe?(i={interpreter:c(t,n)},e.isArray(Ce.completion)&&(i.completion=Ce.completion),r(i)):(le.pause(),y(t,n,function(e){e?(s.interpreter=f(e,!1,n),s.completion=Object.keys(e)):s.interpreter=c(t,n),r(s),le.resume()}));else if("object"===a)r({interpreter:f(t,Ce.checkArity),completion:Object.keys(t)});else{if("undefined"===a)t=e.noop;else if("function"!==a)throw a+" is invalid interpreter value";r({interpreter:t,completion:Ce.completion})}}function w(t,n){var r="boolean"===e.type(n)?"login":n;return function(n,i,o,a){le.pause(),e.jrpc(t,r,[n,i],function(e){o(!e.error&&e.result?e.result:null),le.resume()},d)}}function k(e){return"string"==typeof e?e:"string"==typeof e.fileName?e.fileName+": "+e.message:e.message}function _(t,n){e.isFunction(Ce.exceptionHandler)?Ce.exceptionHandler.call(le,t):le.exception(t,n)}function C(){var e;e=ce.prop?ce.prop("scrollHeight"):ce.attr("scrollHeight"),ce.scrollTop(e)}function S(t,n){try{if(e.isFunction(n))n(function(){});else if("string"!=typeof n){var r=t+" must be string or function";throw r}}catch(e){return _(e,t.toUpperCase()),!1}return!0}function A(n,r){Ce.convertLinks&&!r.raw&&(n=n.replace(j,"[[!;;]$1]").replace(N,"[[!;;]$1]"));var i,o,a=e.terminal.defaults.formatters;if(!r.raw){for(i=0;i<a.length;++i)try{if("function"==typeof a[i]){var s=a[i](n);"string"==typeof s&&(n=s)}}catch(e){alert("formatting error at formatters["+i+"]\n"+(e.stack?e.stack:e))}n=e.terminal.encode(n)}if(ie.push(oe),!r.raw&&(n.length>pe||n.match(/\n/))&&(Ce.wrap===!0&&r.wrap===t||Ce.wrap===!1&&r.wrap===!0)){var l=r.keepWords,c=e.terminal.split_equal(n,pe,l);for(i=0,o=c.length;i<o;++i)""===c[i]||"\r"===c[i]?ie.push("<span></span>"):r.raw?ie.push(c[i]):ie.push(e.terminal.format(c[i],{linksNoReferrer:Ce.linksNoReferrer}))}else r.raw?ie.push(n):(n=e.terminal.format(n,{linksNoReferrer:Ce.linksNoReferrer}),n.split(/\n/).forEach(function(e){ie.push(e)}));ie.push(r.finalize)}function M(t,n){try{var r=e.extend({exec:!0,raw:!1,finalize:e.noop},n||{}),i="function"===e.type(t)?t():t;i="string"===e.type(i)?i:String(i),""!==i&&(r.exec?(i=e.map(i.split(B),function(t){return t.match(B)&&!e.terminal.is_formatting(t)?(t=t.replace(/^\[\[|\]\]$/g,""),ue&&ue.command==t?le.error(Te.recursiveCall):e.terminal.extended_command(le,t),""):t}).join(""),""!==i&&A(i,r)):A(i,r))}catch(e){ie=[],alert("[Internal Exception(process_line)]:"+k(e)+"\n"+e.stack)}}function L(){Ie.resize(pe);var t,n=fe.empty().detach();if(Ce.outputLimit>=0){var r=0===Ce.outputLimit?le.rows():Ce.outputLimit;t=ve.slice(ve.length-r-1)}else t=ve;try{ie=[],e.each(t,function(e,t){M.apply(null,t)}),Ie.before(n),le.flush()}catch(e){alert("Exception in redraw\n"+e.stack)}}function F(){if(Ce.greetings===t)le.echo(le.signature);else if(Ce.greetings){var e=typeof Ce.greetings;"string"===e?le.echo(Ce.greetings):"function"===e?Ce.greetings.call(le,le.echo):le.error(Te.wrongGreetings)}}function O(t){var n=Ie.prompt(),r=Ie.mask();switch(typeof r){case"string":t=t.replace(/./g,r);break;case"boolean":t=r?t.replace(/./g,Ce.maskChar):e.terminal.escape_formatting(t)}var i={finalize:function(e){e.addClass("command")}};e.isFunction(n)?n(function(e){le.echo(e+t,i)}):le.echo(n+t,i)}function E(e){var t=Y.get()[e[0]];if(!t)throw new Error(Te.invalidTerminalId);var n=e[1];if(J[n])t.import_view(J[n]);else{Q=!1;var r=e[2];r&&t.exec(r).then(function(){Q=!0,J[n]=t.export_view()})}}function P(){Q&&(Z=!1,location.hash="#"+JSON.stringify(G),setTimeout(function(){Z=!0},100))}function I(n,r,i){function o(){i||(Q=!0,Ce.historyState&&le.save_state(n,!1),Q=c),l.resolve(),e.isFunction(Ce.onAfterCommand)&&Ce.onAfterCommand(le,n)}re=n,ae&&(ae=!1,(Ce.historyState||Ce.execHash&&i)&&(J.length?le.save_state(null):le.save_state()));try{if(e.isFunction(Ce.onBeforeCommand)&&Ce.onBeforeCommand(le,n)===!1)return;i||(ue=e.terminal.split_command(n)),K()||i&&(e.isFunction(Ce.historyFilter)&&Ce.historyFilter(n)||n.match(Ce.historyFilter))&&Ie.history().append(n);var s=Pe.top();!r&&Ce.echoCommand&&O(n);var l=new e.Deferred,c=Q;if(n.match(/^\s*login\s*$/)&&le.token(!0))le.level()>1?le.logout(!0):le.logout(),o();else if(Ce.exit&&n.match(/^\s*exit\s*$/)&&!we){var u=le.level();(1==u&&le.get_token()||u>1)&&(le.get_token(!0)&&le.set_token(t,!0),le.pop()),o()}else if(Ce.clear&&n.match(/^\s*clear\s*$/)&&!we)le.clear(),o();else{var f=ve.length-1,p=s.interpreter.call(le,n,le);if(p!==t)return le.pause(!0),e.when(p).then(function(e){e&&f===ve.length-1&&a(e),o(),le.resume()});if(Le){se.push(function(){o()})}else o()}return l.promise()}catch(e){throw _(e,"USER"),le.resume(),e}}function R(){if(e.isFunction(Ce.onBeforeLogout))try{if(Ce.onBeforeLogout(le)===!1)return}catch(e){_(e,"onBeforeLogout")}if(q(),e.isFunction(Ce.onAfterLogout))try{Ce.onAfterLogout(le)}catch(e){_(e,"onAfterlogout")}le.login(Ce.login,!0,W)}function q(){var e=le.prefix_name(!0)+"_";Se.remove(e+"token"),Se.remove(e+"login")}function z(t){var n=le.prefix_name()+"_interpreters",r=Se.get(n);r=r?e.parseJSON(r):[],e.inArray(t,r)==-1&&(r.push(t),Se.set(n,JSON.stringify(r)))}function H(t){var n=Pe.top(),r=le.prefix_name(!0);K()||z(r),Ie.name(r),e.isFunction(n.prompt)?Ie.prompt(function(e){n.prompt(e,le)}):Ie.prompt(n.prompt),Ie.set(""),!t&&e.isFunction(n.onStart)&&n.onStart(le)}function W(){function t(){if(Z&&Ce.execHash)try{if(location.hash){var t=location.hash.replace(/^#/,"");G=e.parseJSON(decodeURIComponent(t))}else G=[];G.length?E(G[G.length-1]):J[0]&&le.import_view(J[0])}catch(e){_(e,"TERMINAL")}}H(),F();var n=!1;if(e.isFunction(Ce.onInit)){ke=function(){n=!0};try{Ce.onInit(le)}catch(e){_(e,"OnInit")}finally{ke=e.noop,n||le.resume()}}ee&&(ee=!1,e.fn.hashchange?e(window).hashchange(t):e(window).bind("hashchange",t))}function $(t,n,r){Ce.clear&&e.inArray("clear",r)==-1&&r.push("clear"),Ce.exit&&e.inArray("exit",r)==-1&&r.push("exit");var i=Ie.get().substring(0,Ie.position());if(i===t){for(var o=new RegExp("^"+e.terminal.escape_regex(n)),a=[],s=r.length;s--;)o.test(r[s])&&a.push(r[s]);if(1===a.length)le.insert(a[0].replace(o,""));else if(a.length>1)if(ge>=2){O(t);var l=a.reverse().join("\t");le.echo(e.terminal.escape_brackets(l),{keepWords:!0}),ge=0}else{var c,u=!1;e:for(c=n.length;c<a[0].length;++c){for(s=1;s<a.length;++s)if(a[0].charAt(c)!==a[s].charAt(c))break e;u=!0}u&&le.insert(a[0].slice(0,c).replace(o,""))}}}function K(){return we||Ie.mask()!==!1}function U(n){var r,i,o,a=Pe.top();if(!le.paused()&&le.enabled()){if(e.isFunction(a.keydown)){if(r=a.keydown(n,le),r!==t)return r}else if(e.isFunction(Ce.keydown)&&(r=Ce.keydown(n,le),r!==t))return r;if(o=Ce.completion&&"boolean"!=e.type(Ce.completion)&&a.completion===t?Ce.completion:a.completion,"settings"==o&&(o=Ce.completion),le.oneTime(10,function(){Oe()}),9!==n.which&&(ge=0),68===n.which&&n.ctrlKey)return we||(""===Ie.get()?Pe.size()>1||Ce.login!==t?le.pop(""):(le.resume(),le.echo("")):le.set_command("")),!1;if(76===n.which&&n.ctrlKey)le.clear();else{if(o&&9===n.which){++ge;var s,l=Ie.position(),c=Ie.get().substring(0,l),u=c.split(" ");if(1==Te.length)s=u[0];else for(s=u[u.length-1],i=u.length-1;i>0&&"\\"==u[i-1][u[i-1].length-1];i--)s=u[i-1]+" "+s;switch(e.type(o)){case"function":o(le,s,function(e){$(c,s,e)});break;case"array":$(c,s,o);break;default:throw new Error(Te.invalidCompletion)}return!1}if((118===n.which||86===n.which)&&(n.ctrlKey||n.metaKey))return void le.oneTime(1,function(){C()});if(9===n.which&&n.ctrlKey){if(Y.length()>1)return le.focus(!1),!1}else 34===n.which?le.scroll(le.height()):33===n.which?le.scroll(-le.height()):le.attr({scrollTop:le.attr("scrollHeight")})}}else if(68===n.which&&n.ctrlKey){if(X.length){for(i=X.length;i--;){var f=X[i];if(4!==f.readyState)try{f.abort()}catch(e){le.error(Te.ajaxAbortError)}}X=[],le.resume()}return!1}}function te(){Re&&le.focus()}function ne(){Re=Ae,le.disable()}var re,ie=[],oe=1,ae=!0,se=[],le=this;if(this.length>1)return this.each(function(){e.fn.terminal.call(e(this),n,e.extend({name:le.selector},r))});if(le.data("terminal"))return le.data("terminal");if(0===le.length)throw sprintf(e.terminal.defaults.strings.invalidSelector,le.selector);var ce,ue,fe,pe,de,he,me,ge=0,ve=[],ye=Y.length(),xe=new u,be=e.Deferred(),we=!1,ke=e.noop,_e=[],Ce=e.extend({},e.terminal.defaults,{name:le.selector},r||{}),Se=new i(Ce.memory),Te=e.terminal.defaults.strings,Ae=Ce.enabled,Me=!1,Le=!1,Fe=!0;e.extend(le,e.omap({id:function(){return ye},clear:function(){fe.html(""),ve=[];try{Ce.onClear(le)}catch(e){_(e,"onClear")}return le.attr({scrollTop:0}),le},export_view:function(){var t={};if(e.isFunction(Ce.onExport))try{t=Ce.onExport()}catch(e){_(e,"onExport")}return e.extend({},{focus:Ae,mask:Ie.mask(),prompt:le.get_prompt(),command:le.get_command(),position:Ie.position(),lines:x(ve),interpreters:Pe.clone()},t)},import_view:function(t){if(we)throw new Error(sprintf(Te.notWhileLogin,"import_view"));if(e.isFunction(Ce.onImport))try{Ce.onImport(t)}catch(e){_(e,"onImport")}return be.then(function(){le.set_prompt(t.prompt),le.set_command(t.command),Ie.position(t.position),Ie.mask(t.mask),t.focus&&le.focus(),ve=x(t.lines),Pe=t.interpreters,L()}),le},save_state:function(n,r,i){if("undefined"!=typeof i?J[i]=le.export_view():J.push(le.export_view()),e.isArray(G)||(G=[]),n!==t&&!r){var o=[ye,J.length-1,n];G.push(o),P()}},exec:function(t,n,r){function i(){e.isArray(t)?!function e(){var r=t.shift();r?le.exec(r,n).then(e):o.resolve()}():Le?_e.push([t,n,o]):I(t,n,!0).then(function(){o.resolve(le)})}var o=r||new e.Deferred;return"resolved"!=be.state()?be.then(i):i(),o.promise()},autologin:function(e,t,n){return le.trigger("terminal.autologin",[e,t,n]),le},login:function(t,n,r,i){function o(t,o,s,l){if(o){for(;le.level()>a;)le.pop();Ce.history&&Ie.history().enable();var c=le.prefix_name(!0)+"_";Se.set(c+"token",o),Se.set(c+"login",t),we=!1,e.isFunction(r)&&r()}else n?(s||le.error(Te.wrongPasswordTryAgain),le.pop().set_mask(!1)):(we=!1,s||le.error(Te.wrongPassword),le.pop().pop()),e.isFunction(i)&&i();le.off("terminal.autologin")}if(xe.push([].slice.call(arguments)),we)throw new Error(sprintf(Te.notWhileLogin,"login"));if(!e.isFunction(t))throw new Error(Te.loginIsNotAFunction);if(we=!0,le.token()&&1==le.level()&&!Fe)we=!1,le.logout(!0);else if(le.token(!0)&&le.login_name(!0))return we=!1,e.isFunction(r)&&r(),le;Ce.history&&Ie.history().disable();var a=le.level();return le.on("terminal.autologin",function(e,t,n,r){o(t,n,r)}),le.push(function(e){le.set_mask(Ce.maskChar).push(function(n){try{t.call(le,e,n,function(t,n){o(e,t,n)})}catch(e){_(e,"AUTH")}},{prompt:Te.password+": ",name:"password"})},{prompt:Te.login+": ",name:"login"}),le},settings:function(){return Ce},commands:function(){return Pe.top().interpreter},setInterpreter:function(){return window.console&&console.warn&&console.warn("This function is deprecated, use set_interpreter insead!"),le.set_interpreter.apply(le,arguments)},set_interpreter:function(t,n){function r(){le.pause(),b(t,!!n,function(t){le.resume();var n=Pe.top();e.extend(n,t),H(!0)})}return"string"==e.type(t)&&n?le.login(w(t,n),!0,r):r(),le},greetings:function(){return F(),le},paused:function(){return Le},pause:function(t){return ke(),!Le&&Ie&&be.then(function(){Le=!0,Ie.disable(),t||Ie.hidden(),e.isFunction(Ce.onPause)&&Ce.onPause()}),le},resume:function(){function t(){Le=!1,Y.front()==le&&Ie.enable(),Ie.visible();var t=_e;_e=[];for(var n=0;n<t.length;++n)le.exec.apply(le,t[n]);le.trigger("resume");var r=se.shift();r&&r(),C(),e.isFunction(Ce.onResume)&&Ce.onResume()}return Le&&Ie&&("resolved"!=be.state()?be.then(t):t()),le},cols:function(){return Ce.numChars?Ce.numChars:h(le)},rows:function(){return Ce.numRows?Ce.numRows:m(le)},history:function(){return Ie.history()},history_state:function(e){return e?le.oneTime(1,function(){Ce.historyState=!0,J.length?Y.length()>1&&le.save_state(null):le.save_state()}):Ce.historyState=!1,le},clear_history_state:function(){return G=[],J=[],le},next:function(){if(1===Y.length())return le;le.offset().top,le.height(),le.scrollTop();Y.front().disable();var t=Y.rotate().enable(),n=t.offset().top-50;e("html,body").animate({scrollTop:n},500);try{Ce.onTerminalChange(t)}catch(e){_(e,"onTerminalChange")}return t},focus:function(e,t){return be.then(function(){if(1===Y.length())if(e===!1)try{(!t&&Ce.onBlur(le)!==!1||t)&&le.disable()}catch(e){_(e,"onBlur")}else try{(!t&&Ce.onFocus(le)!==!1||t)&&le.enable()}catch(e){_(e,"onFocus")}else if(e===!1)le.next();else{var n=Y.front();if(n!=le&&(n.disable(),!t))try{Ce.onTerminalChange(le)}catch(e){_(e,"onTerminalChange")}Y.set(le),le.enable()}}),le},freeze:function(e){be.then(function(){e?(le.disable(),Me=!0):(Me=!1,le.enable())})},frozen:function(){return Me},enable:function(){return Ae||Me||(pe===t&&le.resize(),be.then(function(){Ie.enable(),Ae=!0})),le},disable:function(){return Ae&&!Me&&be.then(function(){Ae=!1,Ie.disable()}),le},enabled:function(){return Ae},signature:function(){var e=le.cols(),t=e<15?null:e<35?0:e<55?1:e<64?2:e<75?3:4;return null!==t?V[t].join("\n")+"\n":""},version:function(){return e.terminal.version},cmd:function(){return Ie},get_command:function(){return Ie.get()},set_command:function(e){return be.then(function(){Ie.set(e)}),le},insert:function(e){if("string"==typeof e)return be.then(function(){Ie.insert(e)}),le;throw"insert function argument is not a string"},set_prompt:function(t){return be.then(function(){S("prompt",t)&&(e.isFunction(t)?Ie.prompt(function(e){t(e,le)}):Ie.prompt(t),Pe.top().prompt=t)}),le},get_prompt:function(){return Pe.top().prompt},set_mask:function(e){return be.then(function(){Ie.mask(e===!0?Ce.maskChar:e)}),le},get_output:function(t){return t?ve:e.map(ve,function(t){return e.isFunction(t[0])?t[0]():t[0]}).join("\n")},resize:function(t,n){if(le.is(":visible")){t&&n&&(le.width(t),le.height(n)),t=le.width(),n=le.height();var r=le.cols(),i=le.rows();if(r!==pe||i!==de){pe=r,de=i,L();var o=Pe.top();e.isFunction(o.resize)?o.resize(le):e.isFunction(Ce.onResize)&&Ce.onResize(le),me=n,he=t,C()}}else le.stopTime("resize"),le.oneTime(500,"resize",function(){le.resize(t,n)});return le},flush:function(){try{var t,n=le.is_bottom();if(e.each(ie,function(n,r){if(r===oe)t=e("<div></div>");else if(e.isFunction(r)){t.appendTo(fe);try{r(t)}catch(e){_(e,"USER:echo(finalize)")}}else e("<div/>").html(r).appendTo(t).width("100%")}),Ce.outputLimit>=0){var r=0===Ce.outputLimit?le.rows():Ce.outputLimit,i=fe.find("div div");if(i.length>r){var o=i.length-r+1,a=i.slice(0,o),s=a.parent();a.remove(),s.each(function(){var t=e(this);t.is(":empty")&&t.remove()})}}de=m(le),Oe(),(Ce.scrollOnEcho||n)&&C(),ie=[]}catch(e){alert("[Flush] "+k(e)+"\n"+e.stack)}return le},update:function(e,t){return be.then(function(){e<0&&(e=ve.length+e),ve[e]?(null===t?ve.splice(e,1):ve[e][0]=t,L()):le.error("Invalid line number "+e)}),le},last_index:function(){return ve.length-1},echo:function(t,n){return t=t||"",e.when(t).then(function(t){try{var r=e.extend({flush:!0,raw:Ce.raw,finalize:e.noop,keepWords:!1},n||{});r.flush&&(ie=[]),M(t,r),ve.push([t,e.extend(r,{exec:!1})]),r.flush&&le.flush()}catch(e){alert("[Terminal.echo] "+k(e)+"\n"+e.stack)}}),le},error:function(t,n){var r=e.terminal.escape_brackets(t).replace(/\\$/,"&#92;").replace(D,"]$1[[;;;error]");return le.echo("[[;;;error]"+r+"]",n)},exception:function(t,n){var r=k(t);if(n&&(r="&#91;"+n+"&#93;: "+r),r&&le.error(r,{finalize:function(e){e.addClass("exception message")}}),"string"==typeof t.fileName&&(le.pause(),e.get(t.fileName,function(e){le.resume();var n=t.lineNumber-1,r=e.split("\n")[n];r&&le.error("["+t.lineNumber+"]: "+r)})),t.stack){var i=e.terminal.escape_brackets(t.stack);le.echo(i.split(/\n/g).map(function(e){return"[[;;;error]"+e.replace(D,function(e){return"]"+e+"[[;;;error]"})+"]"}).join("\n"),{finalize:function(e){e.addClass("exception stack-trace")}})}},scroll:function(e){var t;return e=Math.round(e),ce.prop?(e>ce.prop("scrollTop")&&e>0&&ce.prop("scrollTop",0),t=ce.prop("scrollTop"),ce.scrollTop(t+e)):(e>ce.attr("scrollTop")&&e>0&&ce.attr("scrollTop",0),t=ce.attr("scrollTop"),ce.scrollTop(t+e)),le},logout:function(e){if(we)throw new Error(sprintf(Te.notWhileLogin,"logout"));return be.then(function(){if(e){var n=xe.pop();le.set_token(t,!0),le.login.apply(le,n)}else for(;Pe.size()>0&&!le.pop(););}),le},token:function(e){return Se.get(le.prefix_name(e)+"_token")},set_token:function(e,t){var n=le.prefix_name(t)+"_token";return"undefined"==typeof e?Se.remove(n,e):Se.set(n,e),le},get_token:function(e){return Se.get(le.prefix_name(e)+"_token")},login_name:function(e){return Se.get(le.prefix_name(e)+"_login")},name:function(){return Pe.top().name},prefix_name:function(e){var t=(Ce.name?Ce.name+"_":"")+ye;if(e&&Pe.size()>1){var n=Pe.map(function(e){return e.name}).slice(1).join("_");n&&(t+="_"+n)}return t},read:function(t,n){var r=new e.Deferred;return le.push(function(t){le.pop(),e.isFunction(n)&&n(t),r.resolve(t)},{prompt:t}),r.promise()},push:function(n,r){return be.then(function(){r=r||{};var i={infiniteLogin:!1},o=e.extend({},i,r);!o.name&&ue&&(o.name=ue.name),o.prompt===t&&(o.prompt=(o.name||">")+" ");var a=Pe.top();a&&(a.mask=Ie.mask());var s=Le;b(n,!!r.login,function(t){if(Pe.push(e.extend({},t,o)),e.isArray(t.completion)&&o.completion===!0?Pe.top().completion=t.completion:t.completion||o.completion!==!0||(Pe.top().completion=!1),o.login){var r=e.type(o.login);"function"==r?le.login(o.login,o.infiniteLogin,H,o.infiniteLogin?e.noop:le.pop):("string"==e.type(n)&&"string"==r||"boolean"==r)&&le.login(w(n,o.login),o.infiniteLogin,H,o.infiniteLogin?e.noop:le.pop)}else H();s||le.resume()})}),le},pop:function(n){n!==t&&O(n);le.token(!0);if(1==Pe.size()){if(Ce.login){if(R(),e.isFunction(Ce.onExit))try{Ce.onExit(le)}catch(e){_(e,"onExit")}return!0}le.error(Te.canExitError)}else{le.token(!0)&&q();var r=Pe.pop();if(H(),we&&le.get_prompt()!=Te.login+": "&&(we=!1),e.isFunction(r.onExit))try{r.onExit(le)}catch(e){_(e,"onExit")}le.set_mask(Pe.top().mask)}return le},option:function(t,n){if("undefined"==typeof n){if("string"==typeof t)return Ce[t];"object"==typeof t&&e.each(t,function(e,t){Ce[e]=t})}else Ce[t]=n;return le},level:function(){return Pe.size()},reset:function(){return be.then(function(){for(le.clear();Pe.size()>1;)Pe.pop();W()}),le},purge:function(){return be.then(function(){var t=le.prefix_name()+"_",n=Se.get(t+"interpreters");e.each(e.parseJSON(n),function(e,t){Se.remove(t+"_commands"),Se.remove(t+"_token"),Se.remove(t+"_login")}),Ie.purge(),Se.remove(t+"interpreters")}),le},destroy:function(){return be.then(function(){Ie.destroy().remove(),fe.remove(),e(document).unbind(".terminal"),e(window).unbind(".terminal"),le.unbind("click mousewheel mousedown mouseup"),le.removeData("terminal").removeClass("terminal"),Ce.width&&le.css("width",""),Ce.height&&le.css("height",""),e(window).off("blur",ne).off("focus",te),Y.remove(ye)}),le},scroll_to_bottom:C,is_bottom:function(){var t,n,r;return le.is("body")?(t=e(document).height(),n=e(window).scrollTop(),r=window.innerHeight):(t=ce[0].scrollHeight,n=ce.scrollTop(),r=ce.outerHeight()),n+r>t-Ce.scrollBottomOffset}},function(e,t){return function(){try{return t.apply(le,[].slice.apply(arguments))}catch(t){throw"exec"!==e&&"resume"!==e&&_(t,"TERMINAL"),t}}}));var Oe=function(){var e=v(le);return function(){e!==v(le)&&(le.resize(),e=v(le))}}();Ce.width&&le.width(Ce.width),Ce.height&&le.height(Ce.height);var Ee=navigator.userAgent.toLowerCase();if(ce=Ee.match(/(webkit)[ \/]([\w.]+)/)||"body"!=le[0].tagName.toLowerCase()?le:e("html"),e(document).bind("ajaxSend.terminal",function(e,t,n){X.push(t)}),fe=e("<div>").addClass("terminal-output").appendTo(le),le.addClass("terminal"),Ce.login&&e.isFunction(Ce.onBeforeLogin))try{Ce.onBeforeLogin(le)===!1&&(Fe=!1)}catch(e){throw _(e,"onBeforeLogin"),e}var De;Ce.login;if("string"==typeof n)De=n;else if(n instanceof Array)for(var Ne=0,je=n.length;Ne<je;++Ne)if("string"==typeof n[Ne]){De=n[Ne];break}!De||"string"!=typeof Ce.login&&Ce.login!==!0||(Ce.login=w(De,Ce.login)),Y.append(le);var Pe,Ie,Re;return b(n,!!Ce.login,function(n){function r(t){var n=Y.get()[t[0]];if(n&&ye==n.id()&&t[2])try{if(Le){var r=e.Deferred();return se.push(function(){return n.exec(t[2]).then(function(e,i){n.save_state(t[2],!0,t[1]),r.resolve()})}),r.promise()}return n.exec(t[2]).then(function(e,r){n.save_state(t[2],!0,t[1])})}catch(t){var i=e.terminal.escape_brackets(command),o="Error while exec with command "+i;n.error(o).exception(t)}}(Ce.completion&&"boolean"!=typeof Ce.completion||!Ce.completion)&&(n.completion="settings"),Pe=new u(e.extend({name:Ce.name,prompt:Ce.prompt,keypress:Ce.keypress,keydown:Ce.keydown,resize:Ce.onResize,greetings:Ce.greetings,mousewheel:Ce.mousewheel},n)),Ie=e("<div/>").appendTo(le).cmd({prompt:Ce.prompt,history:Ce.memory?"memory":Ce.history,historyFilter:Ce.historyFilter,historySize:Ce.historySize,width:"100%",enabled:Ae&&!T,keydown:U,keypress:function(t){var n=Pe.top();return e.isFunction(n.keypress)?n.keypress(t,le):e.isFunction(Ce.keypress)?Ce.keypress(t,le):void 0},onCommandChange:function(t){if(e.isFunction(Ce.onCommandChange))try{Ce.onCommandChange(t,le)}catch(e){throw _(e,"onCommandChange"),e}C()},commands:I}),Ae&&le.is(":visible")&&!T?le.focus(t,!0):le.disable(),le.oneTime(100,function(){function t(t){var n=e(t.target);!n.closest(".terminal").length&&le.enabled()&&Ce.onBlur(le)!==!1&&le.disable()}e(document).bind("click.terminal",t).bind("contextmenu.terminal",t)});var i=e(window);if(T||i.on("focus",te).on("blur",ne),T?le.click(function(){le.enabled()||Me?le.focus(!1):(le.focus(),Ie.enable())}):!function(){var t=0,n=!1;le.mousedown(function(){le.oneTime(1,function(){e(window).mousemove(function(){n=!0,t=0,e(window).unbind("mousemove")})})}).mouseup(function(){var r=n;n=!1,e(window).unbind("mousemove"),r||1!=++t||(t=0,le.enabled()||Me||(le.focus(),Ie.enable()))})}(),le.delegate(".exception a","click",function(t){var n=e(this).attr("href");n.match(/:[0-9]+$/)&&(t.preventDefault(),s(n))}),navigator.platform.match(/linux/i)||le.mousedown(function(e){if(2==e.which){var t=g();le.insert(t)}}),le.is(":visible")&&(pe=le.cols(),Ie.resize(pe),de=m(le)),Ce.login?le.login(Ce.login,!0,W):W(),le.oneTime(100,function(){i.bind("resize.terminal",function(){if(le.is(":visible")){var e=le.width(),t=le.height();me===t&&he===e||le.resize()}})}),Ce.execHash&&location.hash?setTimeout(function(){try{var t=location.hash.replace(/^#/,"");G=e.parseJSON(decodeURIComponent(t));var n=0;!function e(){var t=G[n++];t?r(t).then(e):Q=!0}()}catch(e){}}):Q=!0,e.event.special.mousewheel){var o=!1;e(document).bind("keydown.terminal",function(e){e.shiftKey&&(o=!0)}).bind("keyup.terminal",function(e){(e.shiftKey||16==e.which)&&(o=!1)}),le.mousewheel(function(t,n){if(!o){var r=Pe.top();if(e.isFunction(r.mousewheel)){var i=r.mousewheel(t,n,le);if(i===!1)return}else e.isFunction(Ce.mousewheel)&&Ce.mousewheel(t,n,le);n>0?le.scroll(-40):le.scroll(40)}})}be.resolve()}),le.data("terminal",le),le}}(t)}).call(t,n(132),n(6))},function(e,t,n){(function(e){/**@license
0 ignored issues
show
Unused Code introduced by
The parameter i is not used and could be removed.

This check looks for parameters in functions that are not used in the function body and are not followed by other parameters which are used inside the function.

Loading history...
Complexity Best Practice introduced by
There is no return statement if "" !== e is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Unused Code introduced by
The parameter n is not used and could be removed.

This check looks for parameters in functions that are not used in the function body and are not followed by other parameters which are used inside the function.

Loading history...
Unused Code introduced by
The parameter e is not used and could be removed.

This check looks for parameters in functions that are not used in the function body and are not followed by other parameters which are used inside the function.

Loading history...
Coding Style Best Practice introduced by
Curly braces around statements make for more readable code and help prevent bugs when you add further statements.

Consider adding curly braces around all statements when they are executed conditionally. This is optional if there is only one statement, but leaving them out can lead to unexpected behaviour if another statement is added later.

Consider:

if (a > 0)
    b = 42;

If you or someone else later decides to put another statement in, only the first statement will be executed.

if (a > 0)
    console.log("a > 0");
    b = 42;

In this case the statement b = 42 will always be executed, while the logging statement will be executed conditionally.

if (a > 0) {
    console.log("a > 0");
    b = 42;
}

ensures that the proper code will be executed conditionally no matter how many statements are added or removed.

Loading history...
Comprehensibility introduced by
You are assigning a value to the catch variable e, thereby shadowing the original value.
Loading history...
Bug introduced by
The variable e does not seem to be initialized in case e.isFunction(Ce.onBeforeLogout) on line 56 is false. Are you sure this can never be the case?
Loading history...
Unused Code introduced by
The parameter t is not used and could be removed.

This check looks for parameters in functions that are not used in the function body and are not followed by other parameters which are used inside the function.

Loading history...
Unused Code introduced by
The parameter r is not used and could be removed.

This check looks for parameters in functions that are not used in the function body and are not followed by other parameters which are used inside the function.

Loading history...
Bug introduced by
The variable e seems to not be initialized for all possible execution paths.
Loading history...
Complexity Best Practice introduced by
There is no return statement if 68 === n.which && n.ctrlKey is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Comprehensibility Best Practice introduced by
The name e is already used for a variable on line 56. Please consider using another name to prevent misunderstandings.
Loading history...
Unused Code introduced by
The parameter a is not used and could be removed.

This check looks for parameters in functions that are not used in the function body and are not followed by other parameters which are used inside the function.

Loading history...
Bug introduced by
The variable navigator seems to be never declared. If this is a global, consider adding a /** global: navigator */ comment.

This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.

To learn more about declaring variables in Javascript, see the MDN.

Loading history...
Coding Style Best Practice introduced by
By convention, constructors like u should be capitalized.
Loading history...
Coding Style introduced by
As per coding-style, switch statements should have a default case.
Loading history...
Bug introduced by
The variable ge does not seem to be initialized in case o = Ce.completion && "bo...== n.which && n.ctrlKey on line 56 is false. Are you sure this can never be the case?
Loading history...
Coding Style Best Practice introduced by
By convention, constructors like i should be capitalized.
Loading history...
Unused Code introduced by
The parameter l is not used and could be removed.

This check looks for parameters in functions that are not used in the function body and are not followed by other parameters which are used inside the function.

Loading history...
Best Practice introduced by
There is no return statement in this branch, but you do return something in other branches. Did you maybe miss it? If you do not want to return anything, consider adding return undefined; explicitly.
Loading history...
Comprehensibility introduced by
Usage of the sequence operator is discouraged, since it may lead to obfuscated code.

The sequence or comma operator allows the inclusion of multiple expressions where only is permitted. The result of the sequence is the value of the last expression.

This operator is most often used in for statements.

Used in another places it can make code hard to read, especially when people do not realize it even exists as a seperate operator.

This check looks for usage of the sequence operator in locations where it is not necessary and could be replaced by a series of expressions or statements.

var a,b,c;

a = 1, b = 1,  c= 3;

could just as well be written as:

var a,b,c;

a = 1;
b = 1;
c = 3;

To learn more about the sequence operator, please refer to the MDN.

Loading history...
Complexity Best Practice introduced by
There is no return statement if n && ye == n.id() && t.2 is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Bug introduced by
The variable e does not seem to be initialized in case e.isFunction(Ce.onInit) on line 56 is false. Are you sure this can never be the case?
Loading history...
Bug introduced by
The variable e does not seem to be initialized in case \/) || "body" != le.0.tagName.toLowerCase() ? le: e("html"), e(document).bind("ajaxSend.terminal", function(e, t, n) { X.push(t); }), fe = e("<div>").addClass("terminal-output").appendTo(le), le.addClass("terminal"), Ce.login && e.isFunction(Ce.onBeforeLogin)">ce = Ee.match((webkit) ...ction(Ce.onBeforeLogin) on line 56 is false. Are you sure this can never be the case?
Loading history...
The variable e does not seem to be initialized in case e.isFunction(Ce.onExport) on line 56 is false. Are you sure this can never be the case?
Loading history...
Bug introduced by
The variable G does not seem to be initialized in case "undefined" != typeof i ...| G = [], n !== t && !r on line 56 is true. Are you sure this can never be the case?
Loading history...
Complexity Best Practice introduced by
There is no return statement if r.name == t is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Bug introduced by
The variable e seems to be never initialized.
Loading history...
Complexity Best Practice introduced by
There is no return statement if "" !== s is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
introduced by
The result of the property access to Ce.login is not used.
Loading history...
Bug introduced by
The variable command seems to be never declared. If this is a global, consider adding a /** global: command */ comment.

This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.

To learn more about declaring variables in Javascript, see the MDN.

Loading history...
Coding Style Comprehensibility Best Practice introduced by
Empty catch clauses should be used with caution; consider adding a comment why this is needed.
Loading history...
introduced by
The for loop does not have a body. Maybe you have misplaced a semicolon. If you do wish to have a loop without a body, use an empty body {}.
Loading history...
Coding Style introduced by
Consider using undefined instead of void(0). It is equivalent and more straightforward to read.
Loading history...
Complexity Best Practice introduced by
There is no return statement if Y.length() > 1 is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Unused Code introduced by
The variable re seems to be never used. Consider removing it.
Loading history...
57
 *       __ _____                     ________                              __
58
 *      / // _  /__ __ _____ ___ __ _/__  ___/__ ___ ______ __ __  __ ___  / /
59
 *  __ / // // // // // _  // _// // / / // _  // _//     // //  \/ // _ \/ /
60
 * /  / // // // // // ___// / / // / / // ___// / / / / // // /\  // // / /__
61
 * \___//____ \\___//____//_/ _\_  / /_//____//_/ /_/ /_//_//_/ /_/ \__\_\___/
62
 *           \/              /____/
63
 * http://terminal.jcubic.pl
64
 *
65
 * This is example of how to create custom formatter for jQuery Terminal
66
 *
67
 * Copyright (c) 2014-2016 Jakub Jankiewicz <http://jcubic.pl>
68
 * Released under the MIT license
69
 *
70
 */
71
!function(e){if(!e.terminal)throw new Error("$.terminal is not defined");e.terminal.overtyping=function(e){return e.replace(/((?:_\x08.|.\x08_)+)/g,function(e,t){var n=e.replace(/_x08|\x08_|_\u0008|\u0008_/g,"");return"[[u;;]"+n+"]"}).replace(/((?:.\x08.)+)/g,function(e,t){return"[[b;#fff;]"+e.replace(/(.)(?:\x08|\u0008)\1/g,function(e,t){return t})+"]"})},e.terminal.ansi_colors={normal:{black:"#000",red:"#A00",green:"#008400",yellow:"#A50",blue:"#00A",magenta:"#A0A",cyan:"#0AA",white:"#AAA"},faited:{black:"#000",red:"#640000",green:"#006100",yellow:"#737300",blue:"#000087",magenta:"#650065",cyan:"#008787",white:"#818181"},bold:{black:"#000",red:"#F55",green:"#44D544",yellow:"#FF5",blue:"#55F",magenta:"#F5F",cyan:"#5FF",white:"#FFF"},palette:["#000000","#AA0000","#00AA00","#AA5500","#0000AA","#AA00AA","#00AAAA","#AAAAAA","#555555","#FF5555","#55FF55","#FFFF55","#5555FF","#FF55FF","#55FFFF","#FFFFFF","#000000","#00005F","#000087","#0000AF","#0000D7","#0000FF","#005F00","#005F5F","#005F87","#005FAF","#005FD7","#005FFF","#008700","#00875F","#008787","#0087AF","#0087D7","#0087FF","#00AF00","#00AF5F","#00AF87","#00AFAF","#00AFD7","#00AFFF","#00D700","#00D75F","#00D787","#00D7AF","#00D7D7","#00D7FF","#00FF00","#00FF5F","#00FF87","#00FFAF","#00FFD7","#00FFFF","#5F0000","#5F005F","#5F0087","#5F00AF","#5F00D7","#5F00FF","#5F5F00","#5F5F5F","#5F5F87","#5F5FAF","#5F5FD7","#5F5FFF","#5F8700","#5F875F","#5F8787","#5F87AF","#5F87D7","#5F87FF","#5FAF00","#5FAF5F","#5FAF87","#5FAFAF","#5FAFD7","#5FAFFF","#5FD700","#5FD75F","#5FD787","#5FD7AF","#5FD7D7","#5FD7FF","#5FFF00","#5FFF5F","#5FFF87","#5FFFAF","#5FFFD7","#5FFFFF","#870000","#87005F","#870087","#8700AF","#8700D7","#8700FF","#875F00","#875F5F","#875F87","#875FAF","#875FD7","#875FFF","#878700","#87875F","#878787","#8787AF","#8787D7","#8787FF","#87AF00","#87AF5F","#87AF87","#87AFAF","#87AFD7","#87AFFF","#87D700","#87D75F","#87D787","#87D7AF","#87D7D7","#87D7FF","#87FF00","#87FF5F","#87FF87","#87FFAF","#87FFD7","#87FFFF","#AF0000","#AF005F","#AF0087","#AF00AF","#AF00D7","#AF00FF","#AF5F00","#AF5F5F","#AF5F87","#AF5FAF","#AF5FD7","#AF5FFF","#AF8700","#AF875F","#AF8787","#AF87AF","#AF87D7","#AF87FF","#AFAF00","#AFAF5F","#AFAF87","#AFAFAF","#AFAFD7","#AFAFFF","#AFD700","#AFD75F","#AFD787","#AFD7AF","#AFD7D7","#AFD7FF","#AFFF00","#AFFF5F","#AFFF87","#AFFFAF","#AFFFD7","#AFFFFF","#D70000","#D7005F","#D70087","#D700AF","#D700D7","#D700FF","#D75F00","#D75F5F","#D75F87","#D75FAF","#D75FD7","#D75FFF","#D78700","#D7875F","#D78787","#D787AF","#D787D7","#D787FF","#D7AF00","#D7AF5F","#D7AF87","#D7AFAF","#D7AFD7","#D7AFFF","#D7D700","#D7D75F","#D7D787","#D7D7AF","#D7D7D7","#D7D7FF","#D7FF00","#D7FF5F","#D7FF87","#D7FFAF","#D7FFD7","#D7FFFF","#FF0000","#FF005F","#FF0087","#FF00AF","#FF00D7","#FF00FF","#FF5F00","#FF5F5F","#FF5F87","#FF5FAF","#FF5FD7","#FF5FFF","#FF8700","#FF875F","#FF8787","#FF87AF","#FF87D7","#FF87FF","#FFAF00","#FFAF5F","#FFAF87","#FFAFAF","#FFAFD7","#FFAFFF","#FFD700","#FFD75F","#FFD787","#FFD7AF","#FFD7D7","#FFD7FF","#FFFF00","#FFFF5F","#FFFF87","#FFFFAF","#FFFFD7","#FFFFFF","#080808","#121212","#1C1C1C","#262626","#303030","#3A3A3A","#444444","#4E4E4E","#585858","#626262","#6C6C6C","#767676","#808080","#8A8A8A","#949494","#9E9E9E","#A8A8A8","#B2B2B2","#BCBCBC","#C6C6C6","#D0D0D0","#DADADA","#E4E4E4","#EEEEEE"]},e.terminal.from_ansi=function(){function t(t){var i,o=t.split(";"),a=!1,s=!1,l=!1,c=[],u="",f="",p=!1,d=!1,h=!1,m=e.terminal.ansi_colors.palette;for(var g in o)if(o.hasOwnProperty(g))if(i=parseInt(o[g],10),h&&(d||p))p&&m[i]&&(u=m[i]),d&&m[i]&&(f=m[i]);else switch(i){case 1:c.push("b"),l=!0,a=!1;break;case 4:c.push("u");break;case 3:c.push("i");break;case 5:h=!0;break;case 38:p=!0;break;case 48:d=!0;break;case 2:a=!0,l=!1;break;case 7:s=!0;break;default:o.indexOf("5")==-1&&(n[i]&&(u=n[i]),r[i]&&(f=r[i]))}if(s)if(u||f){var v=f;f=u,u=v}else u="black",f="white";var y,x,b,w;return y=w=l?e.terminal.ansi_colors.bold:a?e.terminal.ansi_colors.faited:e.terminal.ansi_colors.normal,x=p?u:"inherit"==u?u:y[u],b=d?f:"transparent"==f?f:w[f],[c.join(""),x,b]}var n={30:"black",31:"red",32:"green",33:"yellow",34:"blue",35:"magenta",36:"cyan",37:"white",39:"inherit"},r={40:"black",41:"red",42:"green",43:"yellow",44:"blue",45:"magenta",46:"cyan",47:"white",49:"transparent"};return function(e){var n=e.split(/(\x1B\[[0-9;]*[A-Za-z])/g);if(1==n.length)return e;var r=[];if(n.length>3){var i=n.slice(0,3).join("");i.match(/^\[0*m$/)&&(n=n.slice(3))}for(var o,a,s,l,c=!1,u=0;u<n.length;++u)if(l=n[u].match(/^\x1B\[([0-9;]*)([A-Za-z])$/))switch(l[2]){case"m":0!==+l[1]&&(s=t(l[1])),c?(r.push("]"),0===+l[1]?(c=!1,o=a=""):(s[1]=s[1]||o,s[2]=s[2]||a,r.push("[["+s.join(";")+"]"),s[1]&&(o=s[1]),s[2]&&(a=s[2]))):0!==+l[1]&&(c=!0,s[1]=s[1]||o,s[2]=s[2]||a,r.push("[["+s.join(";")+"]"),s[1]&&(o=s[1]),s[2]&&(a=s[2]))}else r.push(n[u]);return c&&r.push("]"),r.join("")}}(),e.terminal.defaults.formatters.push(e.terminal.overtyping),e.terminal.defaults.formatters.push(e.terminal.from_ansi)}(e)}).call(t,n(6))},function(e,t,n){var r;/*!
0 ignored issues
show
Bug introduced by
The variable s seems to not be initialized for all possible execution paths.
Loading history...
Coding Style introduced by
As per coding-style, switch statements should have a default case.
Loading history...
Comprehensibility introduced by
Usage of the sequence operator is discouraged, since it may lead to obfuscated code.

The sequence or comma operator allows the inclusion of multiple expressions where only is permitted. The result of the sequence is the value of the last expression.

This operator is most often used in for statements.

Used in another places it can make code hard to read, especially when people do not realize it even exists as a seperate operator.

This check looks for usage of the sequence operator in locations where it is not necessary and could be replaced by a series of expressions or statements.

var a,b,c;

a = 1, b = 1,  c= 3;

could just as well be written as:

var a,b,c;

a = 1;
b = 1;
c = 3;

To learn more about the sequence operator, please refer to the MDN.

Loading history...
Unused Code introduced by
The parameter t is not used and could be removed.

This check looks for parameters in functions that are not used in the function body and are not followed by other parameters which are used inside the function.

Loading history...
Coding Style Best Practice introduced by
Curly braces around statements make for more readable code and help prevent bugs when you add further statements.

Consider adding curly braces around all statements when they are executed conditionally. This is optional if there is only one statement, but leaving them out can lead to unexpected behaviour if another statement is added later.

Consider:

if (a > 0)
    b = 42;

If you or someone else later decides to put another statement in, only the first statement will be executed.

if (a > 0)
    console.log("a > 0");
    b = 42;

In this case the statement b = 42 will always be executed, while the logging statement will be executed conditionally.

if (a > 0) {
    console.log("a > 0");
    b = 42;
}

ensures that the proper code will be executed conditionally no matter how many statements are added or removed.

Loading history...
72
 * Sizzle CSS Selector Engine v2.3.3
73
 * https://sizzlejs.com/
74
 *
75
 * Copyright jQuery Foundation and other contributors
76
 * Released under the MIT license
77
 * http://jquery.org/license
78
 *
79
 * Date: 2016-08-08
80
 */
81
!function(i){function o(e,t,n,r){var i,o,a,s,l,c,u,f=t&&t.ownerDocument,p=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==p&&9!==p&&11!==p)return n;if(!r&&((t?t.ownerDocument||t:K)!==I&&P(t),t=t||I,q)){if(11!==p&&(l=we.exec(e)))if(i=l[1]){if(9===p){if(!(a=t.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&W(t,a)&&a.id===i)return n.push(a),n}else{if(l[2])return ne.apply(n,t.getElementsByTagName(e)),n;if((i=l[3])&&T.getElementsByClassName&&t.getElementsByClassName)return ne.apply(n,t.getElementsByClassName(i)),n}if(T.qsa&&!Y[e+" "]&&(!B||!B.test(e))){if(1!==p)f=t,u=e;else if("object"!==t.nodeName.toLowerCase()){for((s=t.getAttribute("id"))?s=s.replace(Se,Te):t.setAttribute("id",s=$),c=F(e),o=c.length;o--;)c[o]="#"+s+" "+v(c[o]);u=c.join(","),f=ke.test(e)&&m(t.parentNode)||t}if(u)try{return ne.apply(n,f.querySelectorAll(u)),n}catch(e){}finally{s===$&&t.removeAttribute("id")}}}return E(e.replace(fe,"$1"),t,n,r)}function a(){function e(n,r){return t.push(n+" ")>A.cacheLength&&delete e[t.shift()],e[n+" "]=r}var t=[];return e}function s(e){return e[$]=!0,e}function l(e){var t=I.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function c(e,t){for(var n=e.split("|"),r=n.length;r--;)A.attrHandle[n[r]]=t}function u(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function f(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function p(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function d(e){return function(t){return"form"in t?t.parentNode&&t.disabled===!1?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&Me(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function h(e){return s(function(t){return t=+t,s(function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function m(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function g(){}function v(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function y(e,t,n){var r=t.dir,i=t.next,o=i||r,a=n&&"parentNode"===o,s=V++;return t.first?function(t,n,i){for(;t=t[r];)if(1===t.nodeType||a)return e(t,n,i);return!1}:function(t,n,l){var c,u,f,p=[U,s];if(l){for(;t=t[r];)if((1===t.nodeType||a)&&e(t,n,l))return!0}else for(;t=t[r];)if(1===t.nodeType||a)if(f=t[$]||(t[$]={}),u=f[t.uniqueID]||(f[t.uniqueID]={}),i&&i===t.nodeName.toLowerCase())t=t[r]||t;else{if((c=u[o])&&c[0]===U&&c[1]===s)return p[2]=c[2];if(u[o]=p,p[2]=e(t,n,l))return!0}return!1}}function x(e){return e.length>1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function b(e,t,n){for(var r=0,i=t.length;r<i;r++)o(e,t[r],n);return n}function w(e,t,n,r,i){for(var o,a=[],s=0,l=e.length,c=null!=t;s<l;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),c&&t.push(s)));return a}function k(e,t,n,r,i,o){return r&&!r[$]&&(r=k(r)),i&&!i[$]&&(i=k(i,o)),s(function(o,a,s,l){var c,u,f,p=[],d=[],h=a.length,m=o||b(t||"*",s.nodeType?[s]:s,[]),g=!e||!o&&t?m:w(m,p,e,s,l),v=n?i||(o?e:h||r)?[]:a:g;if(n&&n(g,v,s,l),r)for(c=w(v,d),r(c,[],s,l),u=c.length;u--;)(f=c[u])&&(v[d[u]]=!(g[d[u]]=f));if(o){if(i||e){if(i){for(c=[],u=v.length;u--;)(f=v[u])&&c.push(g[u]=f);i(null,v=[],c,l)}for(u=v.length;u--;)(f=v[u])&&(c=i?ie(o,f):p[u])>-1&&(o[c]=!(a[c]=f))}}else v=w(v===a?v.splice(h,v.length):v),i?i(null,a,v,l):ne.apply(a,v)})}function _(e){for(var t,n,r,i=e.length,o=A.relative[e[0].type],a=o||A.relative[" "],s=o?1:0,l=y(function(e){return e===t},a,!0),c=y(function(e){return ie(t,e)>-1},a,!0),u=[function(e,n,r){var i=!o&&(r||n!==D)||((t=n).nodeType?l(e,n,r):c(e,n,r));return t=null,i}];s<i;s++)if(n=A.relative[e[s].type])u=[y(x(u),n)];else{if(n=A.filter[e[s].type].apply(null,e[s].matches),n[$]){for(r=++s;r<i&&!A.relative[e[r].type];r++);return k(s>1&&x(u),s>1&&v(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(fe,"$1"),n,s<r&&_(e.slice(s,r)),r<i&&_(e=e.slice(r)),r<i&&v(e))}u.push(n)}return x(u)}function C(e,t){var n=t.length>0,r=e.length>0,i=function(i,a,s,l,c){var u,f,p,d=0,h="0",m=i&&[],g=[],v=D,y=i||r&&A.find.TAG("*",c),x=U+=null==v?1:Math.random()||.1,b=y.length;for(c&&(D=a===I||a||c);h!==b&&null!=(u=y[h]);h++){if(r&&u){for(f=0,a||u.ownerDocument===I||(P(u),s=!q);p=e[f++];)if(p(u,a||I,s)){l.push(u);break}c&&(U=x)}n&&((u=!p&&u)&&d--,i&&m.push(u))}if(d+=h,n&&h!==d){for(f=0;p=t[f++];)p(m,g,a,s);if(i){if(d>0)for(;h--;)m[h]||g[h]||(g[h]=ee.call(l));g=w(g)}ne.apply(l,g),c&&!i&&g.length>0&&d+t.length>1&&o.uniqueSort(l)}return c&&(U=x,D=v),m};return n?s(i):i}var S,T,A,M,L,F,O,E,D,N,j,P,I,R,q,B,z,H,W,$="sizzle"+1*new Date,K=i.document,U=0,V=0,G=a(),X=a(),Y=a(),J=function(e,t){return e===t&&(j=!0),0},Q={}.hasOwnProperty,Z=[],ee=Z.pop,te=Z.push,ne=Z.push,re=Z.slice,ie=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},oe="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",ae="[\\x20\\t\\r\\n\\f]",se="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",le="\\["+ae+"*("+se+")(?:"+ae+"*([*^$|!~]?=)"+ae+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+se+"))|)"+ae+"*\\]",ce=":("+se+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+le+")*)|.*)\\)|)",ue=new RegExp(ae+"+","g"),fe=new RegExp("^"+ae+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ae+"+$","g"),pe=new RegExp("^"+ae+"*,"+ae+"*"),de=new RegExp("^"+ae+"*([>+~]|"+ae+")"+ae+"*"),he=new RegExp("="+ae+"*([^\\]'\"]*?)"+ae+"*\\]","g"),me=new RegExp(ce),ge=new RegExp("^"+se+"$"),ve={ID:new RegExp("^#("+se+")"),CLASS:new RegExp("^\\.("+se+")"),TAG:new RegExp("^("+se+"|[*])"),ATTR:new RegExp("^"+le),PSEUDO:new RegExp("^"+ce),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ae+"*(even|odd|(([+-]|)(\\d*)n|)"+ae+"*(?:([+-]|)"+ae+"*(\\d+)|))"+ae+"*\\)|)","i"),bool:new RegExp("^(?:"+oe+")$","i"),needsContext:new RegExp("^"+ae+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ae+"*((?:-\\d)?\\d*)"+ae+"*\\)|)(?=[^-]|$)","i")},ye=/^(?:input|select|textarea|button)$/i,xe=/^h\d$/i,be=/^[^{]+\{\s*\[native \w/,we=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ke=/[+~]/,_e=new RegExp("\\\\([\\da-f]{1,6}"+ae+"?|("+ae+")|.)","ig"),Ce=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},Se=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,Te=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},Ae=function(){P()},Me=y(function(e){return e.disabled===!0&&("form"in e||"label"in e)},{dir:"parentNode",next:"legend"});try{ne.apply(Z=re.call(K.childNodes),K.childNodes),Z[K.childNodes.length].nodeType}catch(e){ne={apply:Z.length?function(e,t){te.apply(e,re.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}T=o.support={},L=o.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},P=o.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:K;return r!==I&&9===r.nodeType&&r.documentElement?(I=r,R=I.documentElement,q=!L(I),K!==I&&(n=I.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",Ae,!1):n.attachEvent&&n.attachEvent("onunload",Ae)),T.attributes=l(function(e){return e.className="i",!e.getAttribute("className")}),T.getElementsByTagName=l(function(e){return e.appendChild(I.createComment("")),!e.getElementsByTagName("*").length}),T.getElementsByClassName=be.test(I.getElementsByClassName),T.getById=l(function(e){return R.appendChild(e).id=$,!I.getElementsByName||!I.getElementsByName($).length}),T.getById?(A.filter.ID=function(e){var t=e.replace(_e,Ce);return function(e){return e.getAttribute("id")===t}},A.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&q){var n=t.getElementById(e);return n?[n]:[]}}):(A.filter.ID=function(e){var t=e.replace(_e,Ce);return function(e){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},A.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&q){var n,r,i,o=t.getElementById(e);if(o){if(n=o.getAttributeNode("id"),n&&n.value===e)return[o];for(i=t.getElementsByName(e),r=0;o=i[r++];)if(n=o.getAttributeNode("id"),n&&n.value===e)return[o]}return[]}}),A.find.TAG=T.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):T.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},A.find.CLASS=T.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&q)return t.getElementsByClassName(e)},z=[],B=[],(T.qsa=be.test(I.querySelectorAll))&&(l(function(e){R.appendChild(e).innerHTML="<a id='"+$+"'></a><select id='"+$+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&B.push("[*^$]="+ae+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||B.push("\\["+ae+"*(?:value|"+oe+")"),e.querySelectorAll("[id~="+$+"-]").length||B.push("~="),e.querySelectorAll(":checked").length||B.push(":checked"),e.querySelectorAll("a#"+$+"+*").length||B.push(".#.+[+~]")}),l(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=I.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&B.push("name"+ae+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&B.push(":enabled",":disabled"),R.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&B.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),B.push(",.*:")})),(T.matchesSelector=be.test(H=R.matches||R.webkitMatchesSelector||R.mozMatchesSelector||R.oMatchesSelector||R.msMatchesSelector))&&l(function(e){T.disconnectedMatch=H.call(e,"*"),H.call(e,"[s!='']:x"),z.push("!=",ce)}),B=B.length&&new RegExp(B.join("|")),z=z.length&&new RegExp(z.join("|")),t=be.test(R.compareDocumentPosition),W=t||be.test(R.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},J=t?function(e,t){if(e===t)return j=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n?n:(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!T.sortDetached&&t.compareDocumentPosition(e)===n?e===I||e.ownerDocument===K&&W(K,e)?-1:t===I||t.ownerDocument===K&&W(K,t)?1:N?ie(N,e)-ie(N,t):0:4&n?-1:1)}:function(e,t){if(e===t)return j=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e===I?-1:t===I?1:i?-1:o?1:N?ie(N,e)-ie(N,t):0;if(i===o)return u(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)s.unshift(n);for(;a[r]===s[r];)r++;return r?u(a[r],s[r]):a[r]===K?-1:s[r]===K?1:0},I):I},o.matches=function(e,t){return o(e,null,null,t)},o.matchesSelector=function(e,t){if((e.ownerDocument||e)!==I&&P(e),t=t.replace(he,"='$1']"),T.matchesSelector&&q&&!Y[t+" "]&&(!z||!z.test(t))&&(!B||!B.test(t)))try{var n=H.call(e,t);if(n||T.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){}return o(t,I,null,[e]).length>0},o.contains=function(e,t){return(e.ownerDocument||e)!==I&&P(e),W(e,t)},o.attr=function(e,t){(e.ownerDocument||e)!==I&&P(e);var n=A.attrHandle[t.toLowerCase()],r=n&&Q.call(A.attrHandle,t.toLowerCase())?n(e,t,!q):void 0;return void 0!==r?r:T.attributes||!q?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},o.escape=function(e){return(e+"").replace(Se,Te)},o.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},o.uniqueSort=function(e){var t,n=[],r=0,i=0;if(j=!T.detectDuplicates,N=!T.sortStable&&e.slice(0),e.sort(J),j){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return N=null,e},M=o.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=M(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=M(t);return n},A=o.selectors={cacheLength:50,createPseudo:s,match:ve,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(_e,Ce),e[3]=(e[3]||e[4]||e[5]||"").replace(_e,Ce),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||o.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&o.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return ve.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&me.test(n)&&(t=F(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(_e,Ce).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=G[e+" "];return t||(t=new RegExp("(^|"+ae+")"+e+"("+ae+"|$)"))&&G(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=o.attr(r,e);return null==i?"!="===t:!t||(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i.replace(ue," ")+" ").indexOf(n)>-1:"|="===t&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,l){var c,u,f,p,d,h,m=o!==a?"nextSibling":"previousSibling",g=t.parentNode,v=s&&t.nodeName.toLowerCase(),y=!l&&!s,x=!1;if(g){if(o){for(;m;){for(p=t;p=p[m];)if(s?p.nodeName.toLowerCase()===v:1===p.nodeType)return!1;h=m="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?g.firstChild:g.lastChild],a&&y){for(p=g,f=p[$]||(p[$]={}),u=f[p.uniqueID]||(f[p.uniqueID]={}),c=u[e]||[],d=c[0]===U&&c[1],x=d&&c[2],p=d&&g.childNodes[d];p=++d&&p&&p[m]||(x=d=0)||h.pop();)if(1===p.nodeType&&++x&&p===t){u[e]=[U,d,x];break}}else if(y&&(p=t,f=p[$]||(p[$]={}),u=f[p.uniqueID]||(f[p.uniqueID]={}),c=u[e]||[],d=c[0]===U&&c[1],x=d),x===!1)for(;(p=++d&&p&&p[m]||(x=d=0)||h.pop())&&((s?p.nodeName.toLowerCase()!==v:1!==p.nodeType)||!++x||(y&&(f=p[$]||(p[$]={}),u=f[p.uniqueID]||(f[p.uniqueID]={}),u[e]=[U,x]),p!==t)););return x-=i,x===r||x%r===0&&x/r>=0}}},PSEUDO:function(e,t){var n,r=A.pseudos[e]||A.setFilters[e.toLowerCase()]||o.error("unsupported pseudo: "+e);return r[$]?r(t):r.length>1?(n=[e,e,"",t],A.setFilters.hasOwnProperty(e.toLowerCase())?s(function(e,n){for(var i,o=r(e,t),a=o.length;a--;)i=ie(e,o[a]),e[i]=!(n[i]=o[a])}):function(e){return r(e,0,n)}):r}},pseudos:{not:s(function(e){var t=[],n=[],r=O(e.replace(fe,"$1"));return r[$]?s(function(e,t,n,i){for(var o,a=r(e,null,i,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),t[0]=null,!n.pop()}}),has:s(function(e){return function(t){return o(e,t).length>0}}),contains:s(function(e){return e=e.replace(_e,Ce),function(t){return(t.textContent||t.innerText||M(t)).indexOf(e)>-1}}),lang:s(function(e){return ge.test(e||"")||o.error("unsupported lang: "+e),e=e.replace(_e,Ce).toLowerCase(),function(t){var n;do if(n=q?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(e){var t=i.location&&i.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===R},focus:function(e){return e===I.activeElement&&(!I.hasFocus||I.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:d(!1),disabled:d(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!A.pseudos.empty(e)},header:function(e){return xe.test(e.nodeName)},input:function(e){return ye.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:h(function(){return[0]}),last:h(function(e,t){return[t-1]}),eq:h(function(e,t,n){return[n<0?n+t:n]}),even:h(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:h(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:h(function(e,t,n){for(var r=n<0?n+t:n;--r>=0;)e.push(r);return e}),gt:h(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}},A.pseudos.nth=A.pseudos.eq;for(S in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})A.pseudos[S]=f(S);for(S in{submit:!0,reset:!0})A.pseudos[S]=p(S);g.prototype=A.filters=A.pseudos,A.setFilters=new g,F=o.tokenize=function(e,t){var n,r,i,a,s,l,c,u=X[e+" "];if(u)return t?0:u.slice(0);for(s=e,l=[],c=A.preFilter;s;){n&&!(r=pe.exec(s))||(r&&(s=s.slice(r[0].length)||s),l.push(i=[])),n=!1,(r=de.exec(s))&&(n=r.shift(),i.push({value:n,type:r[0].replace(fe," ")}),s=s.slice(n.length));for(a in A.filter)!(r=ve[a].exec(s))||c[a]&&!(r=c[a](r))||(n=r.shift(),i.push({value:n,type:a,matches:r}),s=s.slice(n.length));if(!n)break}return t?s.length:s?o.error(e):X(e,l).slice(0)},O=o.compile=function(e,t){var n,r=[],i=[],o=Y[e+" "];if(!o){for(t||(t=F(e)),n=t.length;n--;)o=_(t[n]),o[$]?r.push(o):i.push(o);o=Y(e,C(i,r)),o.selector=e}return o},E=o.select=function(e,t,n,r){var i,o,a,s,l,c="function"==typeof e&&e,u=!r&&F(e=c.selector||e);if(n=n||[],1===u.length){if(o=u[0]=u[0].slice(0),o.length>2&&"ID"===(a=o[0]).type&&9===t.nodeType&&q&&A.relative[o[1].type]){if(t=(A.find.ID(a.matches[0].replace(_e,Ce),t)||[])[0],!t)return n;c&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(i=ve.needsContext.test(e)?0:o.length;i--&&(a=o[i],!A.relative[s=a.type]);)if((l=A.find[s])&&(r=l(a.matches[0].replace(_e,Ce),ke.test(o[0].type)&&m(t.parentNode)||t))){if(o.splice(i,1),e=r.length&&v(o),!e)return ne.apply(n,r),n;break}}return(c||O(e,u))(r,t,!q,n,!t||ke.test(e)&&m(t.parentNode)||t),n},T.sortStable=$.split("").sort(J).join("")===$,T.detectDuplicates=!!j,P(),T.sortDetached=l(function(e){return 1&e.compareDocumentPosition(I.createElement("fieldset"))}),l(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||c("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),T.attributes&&l(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||c("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),l(function(e){return null==e.getAttribute("disabled")})||c(oe,function(e,t,n){var r;if(!n)return e[t]===!0?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null});var Le=i.Sizzle;o.noConflict=function(){return i.Sizzle===o&&(i.Sizzle=Le),o},r=function(){return o}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))}(window)},function(e,t,n){var r,i;r=[n(0),n(44),n(45),n(11)],i=function(e,t,n){"use strict";var r=[],i=/(=)\?(?=&|$)|\?\?/;e.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var n=r.pop()||e.expando+"_"+t++;return this[n]=!0,n}}),e.ajaxPrefilter("json jsonp",function(t,o,a){var s,l,c,u=t.jsonp!==!1&&(i.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&i.test(t.data)&&"data");if(u||"jsonp"===t.dataTypes[0])return s=t.jsonpCallback=e.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,u?t[u]=t[u].replace(i,"$1"+s):t.jsonp!==!1&&(t.url+=(n.test(t.url)?"&":"?")+t.jsonp+"="+s),t.converters["script json"]=function(){return c||e.error(s+" was not called"),c[0]},t.dataTypes[0]="json",l=window[s],window[s]=function(){c=arguments},a.always(function(){void 0===l?e(window).removeProp(s):window[s]=l,t[s]&&(t.jsonpCallback=o.jsonpCallback,r.push(s)),c&&e.isFunction(l)&&l(c[0]),c=l=void 0}),"script"})}.apply(t,r),!(void 0!==i&&(e.exports=i))},function(e,t,n){var r,i;r=[n(0),n(21),n(104),n(11),n(14),n(17),n(2)],i=function(e,t){"use strict";e.fn.load=function(n,r,i){var o,a,s,l=this,c=n.indexOf(" ");return c>-1&&(o=t(n.slice(c)),n=n.slice(0,c)),e.isFunction(r)?(i=r,r=void 0):r&&"object"==typeof r&&(a="POST"),l.length>0&&e.ajax({url:n,type:a||"GET",dataType:"html",data:r}).done(function(t){s=arguments,l.html(o?e("<div>").append(e.parseHTML(t)).find(o):t)}).always(i&&function(e,t){l.each(function(){i.apply(this,s||[e.responseText,t,e])})}),this}}.apply(t,r),!(void 0!==i&&(e.exports=i))},function(e,t,n){var r,i;r=[n(0)],i=function(e){"use strict";return e.parseXML=function(t){var n;if(!t||"string"!=typeof t)return null;try{n=(new window.DOMParser).parseFromString(t,"text/xml")}catch(e){n=void 0}return n&&!n.getElementsByTagName("parsererror").length||e.error("Invalid XML: "+t),n},e.parseXML}.apply(t,r),!(void 0!==i&&(e.exports=i))},function(e,t,n){var r,i;r=[n(0),n(1),n(11)],i=function(e,t){"use strict";e.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),e.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(t){return e.globalEval(t),t}}}),e.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),e.ajaxTransport("script",function(n){if(n.crossDomain){var r,i;return{send:function(o,a){r=e("<script>").prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&a("error"===e.type?404:200,e.type)}),t.head.appendChild(r[0])},abort:function(){i&&i()}}}})}.apply(t,r),!(void 0!==i&&(e.exports=i))},function(e,t,n){var r;r=function(){"use strict";return window.location}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r,i;r=[n(0),n(10),n(11)],i=function(e,t){"use strict";e.ajaxSettings.xhr=function(){try{return new window.XMLHttpRequest}catch(e){}};var n={0:200,1223:204},r=e.ajaxSettings.xhr();t.cors=!!r&&"withCredentials"in r,t.ajax=r=!!r,e.ajaxTransport(function(e){var i,o;if(t.cors||r&&!e.crossDomain)return{send:function(t,r){var a,s=e.xhr();if(s.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(a in e.xhrFields)s[a]=e.xhrFields[a];e.mimeType&&s.overrideMimeType&&s.overrideMimeType(e.mimeType),e.crossDomain||t["X-Requested-With"]||(t["X-Requested-With"]="XMLHttpRequest");for(a in t)s.setRequestHeader(a,t[a]);i=function(e){return function(){i&&(i=o=s.onload=s.onerror=s.onabort=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?r(0,"error"):r(s.status,s.statusText):r(n[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=i(),o=s.onerror=i("error"),void 0!==s.onabort?s.onabort=o:s.onreadystatechange=function(){4===s.readyState&&window.setTimeout(function(){i&&o()})},i=i("abort");try{s.send(e.hasContent&&e.data||null)}catch(e){if(i)throw e}},abort:function(){i&&i()}}})}.apply(t,r),!(void 0!==i&&(e.exports=i))},function(e,t,n){var r,i;r=[n(0),n(101),n(46),n(102),n(103)],i=function(e){"use strict";return e}.apply(t,r),!(void 0!==i&&(e.exports=i))},function(e,t,n){var r,i;r=[n(0),n(9),n(19),n(7),n(2)],i=function(e,t,n,r){"use strict";var i,o=e.expr.attrHandle;e.fn.extend({attr:function(n,r){return t(this,e.attr,n,r,arguments.length>1)},removeAttr:function(t){return this.each(function(){e.removeAttr(this,t)})}}),e.extend({attr:function(t,n,r){var o,a,s=t.nodeType;if(3!==s&&8!==s&&2!==s)return"undefined"==typeof t.getAttribute?e.prop(t,n,r):(1===s&&e.isXMLDoc(t)||(a=e.attrHooks[n.toLowerCase()]||(e.expr.match.bool.test(n)?i:void 0)),void 0!==r?null===r?void e.removeAttr(t,n):a&&"set"in a&&void 0!==(o=a.set(t,r,n))?o:(t.setAttribute(n,r+""),r):a&&"get"in a&&null!==(o=a.get(t,n))?o:(o=e.find.attr(t,n),null==o?void 0:o))},attrHooks:{type:{set:function(t,r){if(!n.radioValue&&"radio"===r&&e.nodeName(t,"input")){var i=t.value;return t.setAttribute("type",r),i&&(t.value=i),r}}}},removeAttr:function(e,t){var n,i=0,o=t&&t.match(r);if(o&&1===e.nodeType)for(;n=o[i++];)e.removeAttribute(n)}}),i={set:function(t,n,r){return n===!1?e.removeAttr(t,r):t.setAttribute(r,r),r}},e.each(e.expr.match.bool.source.match(/\w+/g),function(t,n){var r=o[n]||e.find.attr;o[n]=function(e,t,n){var i,a,s=t.toLowerCase();return n||(a=o[s],o[s]=i,i=null!=r(e,t,n)?s:null,o[s]=a),i}})}.apply(t,r),!(void 0!==i&&(e.exports=i))},function(e,t,n){var r,i;r=[n(0),n(21),n(7),n(5),n(4)],i=function(e,t,n,r){"use strict";function i(e){return e.getAttribute&&e.getAttribute("class")||""}e.fn.extend({addClass:function(r){var o,a,s,l,c,u,f,p=0;if(e.isFunction(r))return this.each(function(t){e(this).addClass(r.call(this,t,i(this)))});if("string"==typeof r&&r)for(o=r.match(n)||[];a=this[p++];)if(l=i(a),s=1===a.nodeType&&" "+t(l)+" "){for(u=0;c=o[u++];)s.indexOf(" "+c+" ")<0&&(s+=c+" ");f=t(s),l!==f&&a.setAttribute("class",f)}return this},removeClass:function(r){var o,a,s,l,c,u,f,p=0;if(e.isFunction(r))return this.each(function(t){e(this).removeClass(r.call(this,t,i(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof r&&r)for(o=r.match(n)||[];a=this[p++];)if(l=i(a),s=1===a.nodeType&&" "+t(l)+" "){for(u=0;c=o[u++];)for(;s.indexOf(" "+c+" ")>-1;)s=s.replace(" "+c+" "," ");f=t(s),l!==f&&a.setAttribute("class",f)}return this},toggleClass:function(t,o){var a=typeof t;return"boolean"==typeof o&&"string"===a?o?this.addClass(t):this.removeClass(t):e.isFunction(t)?this.each(function(n){e(this).toggleClass(t.call(this,n,i(this),o),o)}):this.each(function(){var o,s,l,c;if("string"===a)for(s=0,l=e(this),c=t.match(n)||[];o=c[s++];)l.hasClass(o)?l.removeClass(o):l.addClass(o);else void 0!==t&&"boolean"!==a||(o=i(this),o&&r.set(this,"__className__",o),this.setAttribute&&this.setAttribute("class",o||t===!1?"":r.get(this,"__className__")||""))})},hasClass:function(e){var n,r,o=0;for(n=" "+e+" ";r=this[o++];)if(1===r.nodeType&&(" "+t(i(r))+" ").indexOf(n)>-1)return!0;return!1}})}.apply(t,r),!(void 0!==i&&(e.exports=i))},function(e,t,n){var r,i;r=[n(0),n(21),n(19),n(4)],i=function(e,t,n){"use strict";var r=/\r/g;e.fn.extend({val:function(t){var n,i,o,a=this[0];{if(arguments.length)return o=e.isFunction(t),this.each(function(r){var i;1===this.nodeType&&(i=o?t.call(this,r,e(this).val()):t,null==i?i="":"number"==typeof i?i+="":e.isArray(i)&&(i=e.map(i,function(e){return null==e?"":e+""})),n=e.valHooks[this.type]||e.valHooks[this.nodeName.toLowerCase()],n&&"set"in n&&void 0!==n.set(this,i,"value")||(this.value=i))});if(a)return n=e.valHooks[a.type]||e.valHooks[a.nodeName.toLowerCase()],n&&"get"in n&&void 0!==(i=n.get(a,"value"))?i:(i=a.value,"string"==typeof i?i.replace(r,""):null==i?"":i)}}}),e.extend({valHooks:{option:{get:function(n){var r=e.find.attr(n,"value");return null!=r?r:t(e.text(n))}},select:{get:function(t){var n,r,i,o=t.options,a=t.selectedIndex,s="select-one"===t.type,l=s?null:[],c=s?a+1:o.length;for(i=a<0?c:s?a:0;i<c;i++)if(r=o[i],(r.selected||i===a)&&!r.disabled&&(!r.parentNode.disabled||!e.nodeName(r.parentNode,"optgroup"))){if(n=e(r).val(),s)return n;l.push(n)}return l},set:function(t,n){for(var r,i,o=t.options,a=e.makeArray(n),s=o.length;s--;)i=o[s],(i.selected=e.inArray(e.valHooks.option.get(i),a)>-1)&&(r=!0);return r||(t.selectedIndex=-1),a}}}}),e.each(["radio","checkbox"],function(){e.valHooks[this]={set:function(t,n){if(e.isArray(n))return t.checked=e.inArray(e(t).val(),n)>-1}},n.checkOn||(e.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})})}.apply(t,r),!(void 0!==i&&(e.exports=i))},function(e,t,n){var r,i;r=[n(0),n(1),n(49),n(60),n(106)],i=function(e,t,n,r,i){"use strict";return e.parseHTML=function(o,a,s){if("string"!=typeof o)return[];"boolean"==typeof a&&(s=a,a=!1);var l,c,u;return a||(i.createHTMLDocument?(a=t.implementation.createHTMLDocument(""),l=a.createElement("base"),l.href=t.location.href,a.head.appendChild(l)):a=t),c=n.exec(o),u=!s&&[],c?[a.createElement(c[1])]:(c=r([o],a,u),u&&u.length&&e(u).remove(),e.merge([],c.childNodes))},e.parseHTML}.apply(t,r),!(void 0!==i&&(e.exports=i))},function(e,t,n){var r,i;r=[n(0)],i=function(e){"use strict";e.readyException=function(e){window.setTimeout(function(){throw e})}}.apply(t,r),!(void 0!==i&&(e.exports=i))},function(e,t,n){var r,i;r=[n(1),n(10)],i=function(e,t){"use strict";return t.createHTMLDocument=function(){var t=e.implementation.createHTMLDocument("").body;return t.innerHTML="<form></form><form></form>",2===t.childNodes.length}(),t}.apply(t,r),!(void 0!==i&&(e.exports=i))},function(e,t,n){var r,i;r=[n(0),n(2)],i=function(e){"use strict";e.expr.pseudos.hidden=function(t){return!e.expr.pseudos.visible(t)},e.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)}}.apply(t,r),!(void 0!==i&&(e.exports=i))},function(e,t,n){var r,i;r=[n(0),n(5),n(55)],i=function(e,t,n){"use strict";function r(t){var n,r=t.ownerDocument,i=t.nodeName,a=o[i];return a?a:(n=r.body.appendChild(r.createElement(i)),a=e.css(n,"display"),n.parentNode.removeChild(n),"none"===a&&(a="block"),o[i]=a,a)}function i(e,i){for(var o,a,s=[],l=0,c=e.length;l<c;l++)a=e[l],a.style&&(o=a.style.display,i?("none"===o&&(s[l]=t.get(a,"display")||null,s[l]||(a.style.display="")),""===a.style.display&&n(a)&&(s[l]=r(a))):"none"!==o&&(s[l]="none",t.set(a,"display",o)));for(l=0;l<c;l++)null!=s[l]&&(e[l].style.display=s[l]);return e}var o={};return e.fn.extend({show:function(){return i(this,!0)},hide:function(){return i(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each(function(){n(this)?e(this).show():e(this).hide()})}}),i}.apply(t,r),!(void 0!==i&&(e.exports=i))},function(e,t,n){var r,i;r=[n(0),n(9),n(5),n(59)],i=function(e,t,n,r){"use strict";function i(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:a.test(e)?JSON.parse(e):e)}function o(e,t,n){var o;if(void 0===n&&1===e.nodeType)if(o="data-"+t.replace(s,"-$&").toLowerCase(),n=e.getAttribute(o),"string"==typeof n){try{n=i(n)}catch(e){}r.set(e,t,n)}else n=void 0;return n}var a=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,s=/[A-Z]/g;return e.extend({hasData:function(e){return r.hasData(e)||n.hasData(e)},data:function(e,t,n){return r.access(e,t,n)},removeData:function(e,t){r.remove(e,t)},_data:function(e,t,r){return n.access(e,t,r)},_removeData:function(e,t){n.remove(e,t)}}),e.fn.extend({data:function(i,a){var s,l,c,u=this[0],f=u&&u.attributes;if(void 0===i){if(this.length&&(c=r.get(u),1===u.nodeType&&!n.get(u,"hasDataAttrs"))){for(s=f.length;s--;)f[s]&&(l=f[s].name,0===l.indexOf("data-")&&(l=e.camelCase(l.slice(5)),o(u,l,c[l])));n.set(u,"hasDataAttrs",!0)}return c}return"object"==typeof i?this.each(function(){r.set(this,i)}):t(this,function(e){var t;if(u&&void 0===e){if(t=r.get(u,i),void 0!==t)return t;if(t=o(u,i),void 0!==t)return t}else this.each(function(){r.set(this,i,e)})},null,a,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){r.remove(this,e)})}}),e}.apply(t,r),!(void 0!==i&&(e.exports=i))},function(e,t,n){var r,i;r=[n(0),n(12)],i=function(e){"use strict";var t=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;e.Deferred.exceptionHook=function(e,n){
0 ignored issues
show
Bug introduced by
The variable a does not seem to be initialized in case o = u.0 = u.0.slice(0), ... && A.relative.o.1.type on line 81 is true. Are you sure this can never be the case?
Loading history...
Bug introduced by
The variable s seems to not be initialized for all possible execution paths.
Loading history...
Complexity Best Practice introduced by
There is no return statement if !n && "input" === e.nodeName.toLowerCase() is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Comprehensibility introduced by
Usage of the sequence operator is discouraged, since it may lead to obfuscated code.

The sequence or comma operator allows the inclusion of multiple expressions where only is permitted. The result of the sequence is the value of the last expression.

This operator is most often used in for statements.

Used in another places it can make code hard to read, especially when people do not realize it even exists as a seperate operator.

This check looks for usage of the sequence operator in locations where it is not necessary and could be replaced by a series of expressions or statements.

var a,b,c;

a = 1, b = 1,  c= 3;

could just as well be written as:

var a,b,c;

a = 1;
b = 1;
c = 3;

To learn more about the sequence operator, please refer to the MDN.

Loading history...
Complexity Best Practice introduced by
There is no return statement if g is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Complexity Best Practice introduced by
There is no return statement if "undefined" != typeof t....ementsByClassName && q is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Bug introduced by
The variable c seems to not be initialized for all possible execution paths.
Loading history...
Bug introduced by
The variable o does not seem to be initialized in case 3 !== s && 8 !== s && 2 !== s on line 81 is true. Are you sure this can never be the case?
Loading history...
Coding Style Best Practice introduced by
By convention, constructors like g should be capitalized.
Loading history...
Coding Style introduced by
Consider using undefined instead of void(0). It is equivalent and more straightforward to read.
Loading history...
Bug introduced by
The variable d does not seem to be initialized in case y && p = t, f = p.$ || p...&& c.1, x = d, x === !1 on line 81 is true. Are you sure this can never be the case?
Loading history...
Complexity Best Practice introduced by
There is no return statement if t = o(u, i), void(0) !== t is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Complexity Best Practice introduced by
There is no return statement if n.crossDomain is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Bug introduced by
The variable i seems to be never initialized.
Loading history...
Complexity Best Practice introduced by
There is no return statement if !n.radioValue && "radio"... e.nodeName(t, "input") is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Complexity Best Practice introduced by
There is no return statement if u || "jsonp" === t.dataTypes.0 is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Bug introduced by
The variable c does not seem to be initialized in case this.length && c = r.get....get(u, "hasDataAttrs") on line 81 is false. Are you sure this can never be the case?
Loading history...
Bug introduced by
The variable i does not seem to be initialized in case a on line 81 is true. Are you sure this can never be the case?
Loading history...
Complexity Best Practice introduced by
There is no return statement if 3 !== s && 8 !== s && 2 !== s is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Bug introduced by
The variable I seems to not be initialized for all possible execution paths.
Loading history...
Bug introduced by
The variable q seems to not be initialized for all possible execution paths.
Loading history...
Complexity Best Practice introduced by
There is no return statement if "undefined" != typeof t.getElementById && q is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Unused Code introduced by
The assignment to t seems to be never used. If you intend to free memory here, this is not necessary since the variable leaves the scope anyway.
Loading history...
Complexity Best Practice introduced by
There is no return statement if !n is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
introduced by
The for loop does not have a body. Maybe you have misplaced a semicolon. If you do wish to have a loop without a body, use an empty body {}.
Loading history...
Coding Style Best Practice introduced by
Curly braces around statements make for more readable code and help prevent bugs when you add further statements.

Consider adding curly braces around all statements when they are executed conditionally. This is optional if there is only one statement, but leaving them out can lead to unexpected behaviour if another statement is added later.

Consider:

if (a > 0)
    b = 42;

If you or someone else later decides to put another statement in, only the first statement will be executed.

if (a > 0)
    console.log("a > 0");
    b = 42;

In this case the statement b = 42 will always be executed, while the logging statement will be executed conditionally.

if (a > 0) {
    console.log("a > 0");
    b = 42;
}

ensures that the proper code will be executed conditionally no matter how many statements are added or removed.

Loading history...
Bug introduced by
The variable i seems to not be initialized for all possible execution paths.
Loading history...
Best Practice introduced by
There is no return statement in this branch, but you do return something in other branches. Did you maybe miss it? If you do not want to return anything, consider adding return undefined; explicitly.
Loading history...
Complexity Best Practice introduced by
There is no return statement if t.cors || r && !e.crossDomain is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Complexity Best Practice introduced by
There is no return statement if a is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Complexity Best Practice introduced by
There is no return statement if e.isArray(n) is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
introduced by
You have used a bitwise operator & in a condition. Did you maybe want to use the logical operator &&
Loading history...
Bug introduced by
The variable e seems to be never initialized.
Loading history...
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
82
window.console&&window.console.warn&&e&&t.test(e.name)&&window.console.warn("jQuery.Deferred exception: "+e.message,e.stack,n)}}.apply(t,r),!(void 0!==i&&(e.exports=i))},function(e,t,n){var r,i;r=[n(0)],i=function(e){"use strict";e.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),e.parseJSON=JSON.parse}.apply(t,r),!(void 0!==i&&(e.exports=i))},function(e,t,n){var r,i;r=[n(0),n(9),n(15)],i=function(e,t){"use strict";return e.each({Height:"height",Width:"width"},function(n,r){e.each({padding:"inner"+n,content:r,"":"outer"+n},function(i,o){e.fn[o]=function(a,s){var l=arguments.length&&(i||"boolean"!=typeof a),c=i||(a===!0||s===!0?"margin":"border");return t(this,function(t,r,i){var a;return e.isWindow(t)?0===o.indexOf("outer")?t["inner"+n]:t.document.documentElement["client"+n]:9===t.nodeType?(a=t.documentElement,Math.max(t.body["scroll"+n],a["scroll"+n],t.body["offset"+n],a["offset"+n],a["client"+n])):void 0===i?e.css(t,r,c):e.style(t,r,i,c)},r,l?a:void 0,l)}})}),e}.apply(t,r),!(void 0!==i&&(e.exports=i))},function(e,t,n){var r,i;r=[n(0),n(15)],i=function(e){"use strict";function t(e,n,r,i,o){return new t.prototype.init(e,n,r,i,o)}e.Tween=t,t.prototype={constructor:t,init:function(t,n,r,i,o,a){this.elem=t,this.prop=r,this.easing=o||e.easing._default,this.options=n,this.start=this.now=this.cur(),this.end=i,this.unit=a||(e.cssNumber[r]?"":"px")},cur:function(){var e=t.propHooks[this.prop];return e&&e.get?e.get(this):t.propHooks._default.get(this)},run:function(n){var r,i=t.propHooks[this.prop];return this.options.duration?this.pos=r=e.easing[this.easing](n,this.options.duration*n,0,1,this.options.duration):this.pos=r=n,this.now=(this.end-this.start)*r+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),i&&i.set?i.set(this):t.propHooks._default.set(this),this}},t.prototype.init.prototype=t.prototype,t.propHooks={_default:{get:function(t){var n;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(n=e.css(t.elem,t.prop,""),n&&"auto"!==n?n:0)},set:function(t){e.fx.step[t.prop]?e.fx.step[t.prop](t):1!==t.elem.nodeType||null==t.elem.style[e.cssProps[t.prop]]&&!e.cssHooks[t.prop]?t.elem[t.prop]=t.now:e.style(t.elem,t.prop,t.now+t.unit)}}},t.propHooks.scrollTop=t.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},e.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},e.fx=t.prototype.init,e.fx.step={}}.apply(t,r),!(void 0!==i&&(e.exports=i))},function(e,t,n){var r,i;r=[n(0),n(2),n(25)],i=function(e){"use strict";e.expr.pseudos.animated=function(t){return e.grep(e.timers,function(e){return t===e.elem}).length}}.apply(t,r),!(void 0!==i&&(e.exports=i))},function(e,t,n){var r,i;r=[n(0),n(13)],i=function(e){"use strict";e.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(t,n){e.fn[n]=function(e){return this.on(n,e)}})}.apply(t,r),!(void 0!==i&&(e.exports=i))},function(e,t,n){var r,i;r=[n(0),n(13),n(26)],i=function(e){"use strict";e.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(t,n){e.fn[n]=function(e,t){return arguments.length>0?this.on(n,null,e,t):this.trigger(n)}}),e.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}})}.apply(t,r),!(void 0!==i&&(e.exports=i))},function(e,t,n){var r,i;r=[n(0),n(5),n(118),n(13),n(26)],i=function(e,t,n){"use strict";return n.focusin||e.each({focus:"focusin",blur:"focusout"},function(n,r){var i=function(t){e.event.simulate(r,t.target,e.event.fix(t))};e.event.special[r]={setup:function(){var e=this.ownerDocument||this,o=t.access(e,r);o||e.addEventListener(n,i,!0),t.access(e,r,(o||0)+1)},teardown:function(){var e=this.ownerDocument||this,o=t.access(e,r)-1;o?t.access(e,r,o):(e.removeEventListener(n,i,!0),t.remove(e,r))}}}),e}.apply(t,r),!(void 0!==i&&(e.exports=i))},function(e,t,n){var r,i;r=[n(10)],i=function(e){"use strict";return e.focusin="onfocusin"in window,e}.apply(t,r),!(void 0!==i&&(e.exports=i))},function(e,t,n){var r,i,r,i;r=[n(0)],i=function(n){"use strict";r=[],i=function(){return n}.apply(t,r),!(void 0!==i&&(e.exports=i))}.apply(t,r),!(void 0!==i&&(e.exports=i))},function(e,t,n){var r,i;r=[n(0)],i=function(e,t){"use strict";var n=window.jQuery,r=window.$;e.noConflict=function(t){return window.$===e&&(window.$=r),t&&window.jQuery===e&&(window.jQuery=n),e},t||(window.jQuery=window.$=e)}.apply(t,r),!(void 0!==i&&(e.exports=i))},function(e,t,n){var r,i;r=[n(11)],i=function(e){"use strict";return e._evalUrl=function(t){return e.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,throws:!0})},e._evalUrl}.apply(t,r),!(void 0!==i&&(e.exports=i))},function(e,t,n){var r,i;r=[n(1),n(10)],i=function(e,t){"use strict";return function(){var n=e.createDocumentFragment(),r=n.appendChild(e.createElement("div")),i=e.createElement("input");i.setAttribute("type","radio"),i.setAttribute("checked","checked"),i.setAttribute("name","t"),r.appendChild(i),t.checkClone=r.cloneNode(!0).cloneNode(!0).lastChild.checked,r.innerHTML="<textarea>x</textarea>",t.noCloneChecked=!!r.cloneNode(!0).lastChild.defaultValue}(),t}.apply(t,r),!(void 0!==i&&(e.exports=i))},function(e,t,n){var r,i;r=[n(0),n(9),n(1),n(29),n(23),n(52),n(50),n(22),n(4),n(15),n(2)],i=function(e,t,n,r,i,o,a,s){"use strict";function l(t){return e.isWindow(t)?t:9===t.nodeType&&t.defaultView}return e.offset={setOffset:function(t,n,r){var i,o,a,s,l,c,u,f=e.css(t,"position"),p=e(t),d={};"static"===f&&(t.style.position="relative"),l=p.offset(),a=e.css(t,"top"),c=e.css(t,"left"),u=("absolute"===f||"fixed"===f)&&(a+c).indexOf("auto")>-1,u?(i=p.position(),s=i.top,o=i.left):(s=parseFloat(a)||0,o=parseFloat(c)||0),e.isFunction(n)&&(n=n.call(t,r,e.extend({},l))),null!=n.top&&(d.top=n.top-l.top+s),null!=n.left&&(d.left=n.left-l.left+o),"using"in n?n.using.call(t,d):p.css(d)}},e.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(n){e.offset.setOffset(this,t,n)});var n,r,i,o,a=this[0];if(a)return a.getClientRects().length?(i=a.getBoundingClientRect(),i.width||i.height?(o=a.ownerDocument,r=l(o),n=o.documentElement,{top:i.top+r.pageYOffset-n.clientTop,left:i.left+r.pageXOffset-n.clientLeft}):i):{top:0,left:0}},position:function(){if(this[0]){var t,n,r=this[0],i={top:0,left:0};return"fixed"===e.css(r,"position")?n=r.getBoundingClientRect():(t=this.offsetParent(),n=this.offset(),e.nodeName(t[0],"html")||(i=t.offset()),i={top:i.top+e.css(t[0],"borderTopWidth",!0),left:i.left+e.css(t[0],"borderLeftWidth",!0)}),{top:n.top-i.top-e.css(r,"marginTop",!0),left:n.left-i.left-e.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent;t&&"static"===e.css(t,"position");)t=t.offsetParent;return t||r})}}),e.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(n,r){var i="pageYOffset"===r;e.fn[n]=function(e){return t(this,function(e,t,n){var o=l(e);return void 0===n?o?o[r]:e[t]:void(o?o.scrollTo(i?o.pageXOffset:n,i?n:o.pageYOffset):e[t]=n)},n,e,arguments.length)}}),e.each(["top","left"],function(t,n){e.cssHooks[n]=a(s.pixelPosition,function(t,r){if(r)return r=o(t,n),i.test(r)?e(t).position()[n]+"px":r})}),e}.apply(t,r),!(void 0!==i&&(e.exports=i))},function(e,t,n){var r,i;r=[n(0),n(27),n(25)],i=function(e){"use strict";return e.fn.delay=function(t,n){return t=e.fx?e.fx.speeds[t]||t:t,n=n||"fx",this.queue(n,function(e,n){var r=window.setTimeout(e,t);n.stop=function(){window.clearTimeout(r)}})},e.fn.delay}.apply(t,r),!(void 0!==i&&(e.exports=i))},function(e,t,n){var r,i;r=[n(0),n(93)],i=function(e,t){"use strict";e.find=t,e.expr=t.selectors,e.expr[":"]=e.expr.pseudos,e.uniqueSort=e.unique=t.uniqueSort,e.text=t.getText,e.isXMLDoc=t.isXML,e.contains=t.contains,e.escapeSelector=t.escape}.apply(t,r),!(void 0!==i&&(e.exports=i))},function(e,t,n){var r,i;r=[n(0)],i=function(e){"use strict";return function(t,n,r){for(var i=[],o=void 0!==r;(t=t[n])&&9!==t.nodeType;)if(1===t.nodeType){if(o&&e(t).is(r))break;i.push(t)}return i}}.apply(t,r),!(void 0!==i&&(e.exports=i))},function(e,t,n){var r;r=function(){"use strict";return function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r,i;r=[n(71)],i=function(e){"use strict";return e.call(Object)}.apply(t,r),!(void 0!==i&&(e.exports=i))},function(e,t,n){var r;r=function(){"use strict";return Object.getPrototypeOf}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))},function(e,t,n){var r,i;r=[n(28)],i=function(e){"use strict";return e.toString}.apply(t,r),!(void 0!==i&&(e.exports=i))},function(e,t,n){var r,i;r=[n(0),n(4),n(17),n(14)],i=function(e){"use strict";return e.fn.extend({wrapAll:function(t){var n;return this[0]&&(e.isFunction(t)&&(t=t.call(this[0])),n=e(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&n.insertBefore(this[0]),n.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(t){return e.isFunction(t)?this.each(function(n){e(this).wrapInner(t.call(this,n))}):this.each(function(){var n=e(this),r=n.contents();r.length?r.wrapAll(t):n.append(t)})},wrap:function(t){var n=e.isFunction(t);return this.each(function(r){e(this).wrapAll(n?t.call(this,r):t)})},unwrap:function(t){return this.parent(t).not("body").each(function(){e(this).replaceWith(this.childNodes)}),this}}),e}.apply(t,r),!(void 0!==i&&(e.exports=i))},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){n(73),e.exports=n(74)}]);
0 ignored issues
show
Comprehensibility introduced by
Usage of the sequence operator is discouraged, since it may lead to obfuscated code.

The sequence or comma operator allows the inclusion of multiple expressions where only is permitted. The result of the sequence is the value of the last expression.

This operator is most often used in for statements.

Used in another places it can make code hard to read, especially when people do not realize it even exists as a seperate operator.

This check looks for usage of the sequence operator in locations where it is not necessary and could be replaced by a series of expressions or statements.

var a,b,c;

a = 1, b = 1,  c= 3;

could just as well be written as:

var a,b,c;

a = 1;
b = 1;
c = 3;

To learn more about the sequence operator, please refer to the MDN.

Loading history...
Complexity Best Practice introduced by
There is no return statement if this.0 is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Complexity Best Practice introduced by
There is no return statement if r is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Performance Best Practice introduced by
Using new Function() to create a function is slow and difficult to debug. Such functions do not create a closure. Consider using another way to define your function.
Loading history...
Complexity Best Practice introduced by
There is no return statement if a is false. Are you sure this is correct? If so, consider adding return; explicitly.

This check looks for functions where a return statement is found in some execution paths, but not in all.

Consider this little piece of code

function isBig(a) {
    if (a > 5000) {
        return "yes";
    }
}

console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined

The function isBig will only return a specific value when its parameter is bigger than 5000. In any other case, it will implicitly return undefined.

This behaviour may not be what you had intended. In any case, you can add a return undefined to the other execution path to make the return value explicit.

Loading history...
Security Performance introduced by
Calls to eval are slow and potentially dangerous, especially on untrusted code. Please consider whether there is another way to achieve your goal.
Loading history...
Unused Code introduced by
The loop variable n is initialized by the loop but not used in the test. Consider using another type of loop if this is the intended behavior.
Loading history...
Comprehensibility Naming Best Practice introduced by
The variable i already seems to be declared on line 82. Consider using another variable name or omitting the var keyword.

This check looks for variables that are declared in multiple lines. There may be several reasons for this.

In the simplest case the variable name was reused by mistake. This may lead to very hard to locate bugs.

If you want to reuse a variable for another purpose, consider declaring it at or near the top of your function and just assigning to it subsequently so it is always declared.

Loading history...
Coding Style introduced by
Consider using undefined instead of void(0). It is equivalent and more straightforward to read.
Loading history...
Coding Style Best Practice introduced by
Curly braces around statements make for more readable code and help prevent bugs when you add further statements.

Consider adding curly braces around all statements when they are executed conditionally. This is optional if there is only one statement, but leaving them out can lead to unexpected behaviour if another statement is added later.

Consider:

if (a > 0)
    b = 42;

If you or someone else later decides to put another statement in, only the first statement will be executed.

if (a > 0)
    console.log("a > 0");
    b = 42;

In this case the statement b = 42 will always be executed, while the logging statement will be executed conditionally.

if (a > 0) {
    console.log("a > 0");
    b = 42;
}

ensures that the proper code will be executed conditionally no matter how many statements are added or removed.

Loading history...
Unused Code introduced by
The parameter t is not used and could be removed.

This check looks for parameters in functions that are not used in the function body and are not followed by other parameters which are used inside the function.

Loading history...
Comprehensibility Naming Best Practice introduced by
The variable r already seems to be declared on line 82. Consider using another variable name or omitting the var keyword.

This check looks for variables that are declared in multiple lines. There may be several reasons for this.

In the simplest case the variable name was reused by mistake. This may lead to very hard to locate bugs.

If you want to reuse a variable for another purpose, consider declaring it at or near the top of your function and just assigning to it subsequently so it is always declared.

Loading history...